NO-JIRA Fixing intermittent failure (Wait condition)

This commit is contained in:
Clebert Suconic 2020-05-04 18:48:46 -04:00
parent 8e0fb3ebed
commit 863f0298d5
1 changed files with 4 additions and 0 deletions

View File

@ -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.ServerLocator;
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.settings.impl.AddressFullMessagePolicy;
import org.apache.activemq.artemis.tests.util.Wait;
@ -159,6 +160,9 @@ public class MetricsPluginTest extends ActiveMQTestBase {
producer.send(message);
producer.close();
Queue queue = server.locateQueue(queueName);
Wait.assertEquals(1, queue::getMessageCount);
Map<Meter.Id, Double> metrics = getMetrics();
checkMetric(metrics, "artemis.message.count", "queue", queueName, 1.0);