NO-JIRA Speeding up AddressqueueDeleteDelayTest

This commit is contained in:
Clebert Suconic 2021-02-01 11:26:53 -05:00
parent d186d20406
commit 1ed52cc5b0
1 changed files with 5 additions and 2 deletions

View File

@ -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