You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2021/02/01 16:35:58 UTC

[activemq-artemis] branch master updated: NO-JIRA Speeding up AddressqueueDeleteDelayTest

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ed52cc  NO-JIRA Speeding up AddressqueueDeleteDelayTest
1ed52cc is described below

commit 1ed52cc5b0c53956fcc9afd4d5a715853efac5a5
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Mon Feb 1 11:26:53 2021 -0500

    NO-JIRA Speeding up AddressqueueDeleteDelayTest
---
 .../tests/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 966ae81..de2e2d1 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