From 1ed52cc5b0c53956fcc9afd4d5a715853efac5a5 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 1 Feb 2021 11:26:53 -0500 Subject: [PATCH] NO-JIRA Speeding up AddressqueueDeleteDelayTest --- .../integration/server/AddressQueueDeleteDelayTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java index 966ae811ba..de2e2d18e8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressQueueDeleteDelayTest.java @@ -41,6 +41,7 @@ public class AddressQueueDeleteDelayTest extends ActiveMQTestBase { private static final Logger log = Logger.getLogger(AddressQueueDeleteDelayTest.class); public static final int DURATION_MILLIS = 30_000; + public static final int NEGATIVE_DURATION_MILLIS = 1_000; public static final int SLEEP_MILLIS = 100; private ActiveMQServer server; @@ -196,7 +197,8 @@ public class AddressQueueDeleteDelayTest extends ActiveMQTestBase { session.createQueue(new QueueConfiguration(queue).setAddress(address)); session.deleteQueue(queue); - assertFalse(Wait.waitFor(() -> server.getAddressInfo(address) == null, DURATION_MILLIS, SLEEP_MILLIS)); + Thread.sleep(1000); // waiting some time so the delay would kick in if misconfigured + Assert.assertTrue(server.getAddressInfo(address) != null); } @Test @@ -213,7 +215,8 @@ public class AddressQueueDeleteDelayTest extends ActiveMQTestBase { session.createQueue(new QueueConfiguration(queue).setAddress(address)); session.deleteQueue(queue); - assertFalse(Wait.waitFor(() -> server.getAddressInfo(address) == null, DURATION_MILLIS, SLEEP_MILLIS)); + Thread.sleep(1000); // waiting some time so the delay would kick in if misconfigured + Assert.assertTrue(server.getAddressInfo(address) != null); } @Override