NO-JIRA Fixing intermittent failure (Wait condition)
This commit is contained in:
parent
8e0fb3ebed
commit
863f0298d5
|
@ -37,6 +37,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
|
||||||
import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
|
import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
|
||||||
import org.apache.activemq.artemis.api.core.client.ServerLocator;
|
import org.apache.activemq.artemis.api.core.client.ServerLocator;
|
||||||
import org.apache.activemq.artemis.core.server.ActiveMQServer;
|
import org.apache.activemq.artemis.core.server.ActiveMQServer;
|
||||||
|
import org.apache.activemq.artemis.core.server.Queue;
|
||||||
import org.apache.activemq.artemis.core.server.metrics.plugins.SimpleMetricsPlugin;
|
import org.apache.activemq.artemis.core.server.metrics.plugins.SimpleMetricsPlugin;
|
||||||
import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
|
import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
|
||||||
import org.apache.activemq.artemis.tests.util.Wait;
|
import org.apache.activemq.artemis.tests.util.Wait;
|
||||||
|
@ -159,6 +160,9 @@ public class MetricsPluginTest extends ActiveMQTestBase {
|
||||||
producer.send(message);
|
producer.send(message);
|
||||||
producer.close();
|
producer.close();
|
||||||
|
|
||||||
|
Queue queue = server.locateQueue(queueName);
|
||||||
|
Wait.assertEquals(1, queue::getMessageCount);
|
||||||
|
|
||||||
Map<Meter.Id, Double> metrics = getMetrics();
|
Map<Meter.Id, Double> metrics = getMetrics();
|
||||||
|
|
||||||
checkMetric(metrics, "artemis.message.count", "queue", queueName, 1.0);
|
checkMetric(metrics, "artemis.message.count", "queue", queueName, 1.0);
|
||||||
|
|
Loading…
Reference in New Issue