diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java index ae2da9a6e9..6ffbf46069 100644 --- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java +++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java @@ -68,11 +68,11 @@ import org.apache.activemq.artemis.core.server.management.ManagementContext; import org.apache.activemq.artemis.nativo.jlibaio.LibaioContext; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQDestination; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.utils.DefaultSensitiveStringCodec; import org.apache.activemq.artemis.utils.HashProcessor; import org.apache.activemq.artemis.utils.PasswordMaskingUtil; import org.apache.activemq.artemis.utils.StringUtil; +import org.apache.activemq.artemis.utils.Wait; import org.apache.commons.configuration2.PropertiesConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Configurations; diff --git a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/ThreadLeakCheckRule.java b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/ThreadLeakCheckRule.java deleted file mode 100644 index 3fc8d2f6af..0000000000 --- a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/ThreadLeakCheckRule.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.activemq.artemis.junit; - -import java.lang.ref.WeakReference; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.apache.activemq.artemis.api.core.client.ActiveMQClient; -import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnector; -import org.jboss.logging.Logger; -import org.junit.Assert; -import org.junit.rules.ExternalResource; - -/** - * Messaging tests are usually Thread intensive and a thread leak or a server leakage may affect future tests. - * This Rule will prevent Threads leaking from one test into another by checking left over threads. - * This will also clear Client Thread Pools from ActiveMQClient. - */ -public class ThreadLeakCheckRule extends ExternalResource { - - private static Logger log = Logger.getLogger(ThreadLeakCheckRule.class); - - private static Set knownThreads = new HashSet<>(); - - static { - addKownThread("MemoryPoolMXBean notification dispatcher"); - addKownThread("threadDeathWatcher"); - addKownThread("SeedGenerator Thread"); - addKownThread("Attach Listener"); - } - - boolean enabled = true; - - private Map previousThreads; - - public void disable() { - enabled = false; - } - - /** - * Override to set up your specific external resource. - * - * @throws Throwable if setup fails (which will disable {@code after}) - */ - @Override - protected void before() throws Throwable { - // do nothing - - previousThreads = Thread.getAllStackTraces(); - - } - - /** - * Override to tear down your specific external resource. - */ - @Override - protected void after() { - ActiveMQClient.clearThreadPools(); - InVMConnector.resetThreadPool(); - - try { - if (enabled) { - boolean failed = true; - - boolean failedOnce = false; - - long timeout = System.currentTimeMillis() + 60000; - while (failed && timeout > System.currentTimeMillis()) { - failed = checkThread(); - - if (failed) { - failedOnce = true; - forceGC(); - try { - Thread.sleep(500); - } catch (Throwable e) { - } - } - } - - if (failed) { - Assert.fail("Thread leaked"); - } else if (failedOnce) { - System.out.println("******************** Threads cleared after retries ********************"); - System.out.println(); - } - - } else { - enabled = true; - } - } finally { - // clearing just to help GC - previousThreads = null; - } - - } - - private static int failedGCCalls = 0; - - public static void forceGC() { - - if (failedGCCalls >= 10) { - log.info("ignoring forceGC call since it seems System.gc is not working anyways"); - return; - } - log.info("#test forceGC"); - CountDownLatch finalized = new CountDownLatch(1); - WeakReference dumbReference = new WeakReference<>(new DumbReference(finalized)); - - long timeout = System.currentTimeMillis() + 1000; - - // A loop that will wait GC, using the minimal time as possible - while (!(dumbReference.get() == null && finalized.getCount() == 0) && System.currentTimeMillis() < timeout) { - System.gc(); - System.runFinalization(); - try { - finalized.await(100, TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - } - } - - if (dumbReference.get() != null) { - failedGCCalls++; - log.info("It seems that GC is disabled at your VM"); - } else { - // a success would reset the count - failedGCCalls = 0; - } - log.info("#test forceGC Done "); - } - - public static void removeKownThread(String name) { - knownThreads.remove(name); - } - - public static void addKownThread(String name) { - knownThreads.add(name); - } - - private boolean checkThread() { - boolean failedThread = false; - - Map postThreads = Thread.getAllStackTraces(); - - if (postThreads != null && previousThreads != null && postThreads.size() > previousThreads.size()) { - - for (Thread aliveThread : postThreads.keySet()) { - if (aliveThread.isAlive() && !isExpectedThread(aliveThread) && !previousThreads.containsKey(aliveThread)) { - if (!failedThread) { - System.out.println("*********************************************************************************"); - System.out.println("LEAKING THREADS"); - } - failedThread = true; - System.out.println("============================================================================="); - System.out.println("Thread " + aliveThread + " is still alive with the following stackTrace:"); - StackTraceElement[] elements = postThreads.get(aliveThread); - for (StackTraceElement el : elements) { - System.out.println(el); - } - } - - } - if (failedThread) { - System.out.println("*********************************************************************************"); - } - } - - return failedThread; - } - - /** - * if it's an expected thread... we will just move along ignoring it - * - * @param thread - * @return - */ - private boolean isExpectedThread(Thread thread) { - - for (String known : knownThreads) { - if (thread.getName().contains(known)) { - return true; - } - } - - return false; - } - - protected static class DumbReference { - - private CountDownLatch finalized; - - public DumbReference(CountDownLatch finalized) { - this.finalized = finalized; - } - - @Override - public void finalize() throws Throwable { - finalized.countDown(); - super.finalize(); - } - } - -} diff --git a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/Wait.java b/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/Wait.java deleted file mode 100644 index 44dbeca05f..0000000000 --- a/artemis-junit/src/main/java/org/apache/activemq/artemis/junit/Wait.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.activemq.artemis.junit; - -import java.util.concurrent.TimeUnit; - -import org.junit.Assert; - -/** - * Utility adapted from: org.apache.activemq.util.Wait - */ -public class Wait { - - - public static final long MAX_WAIT_MILLIS = 30 * 1000; - public static final int SLEEP_MILLIS = 1000; - - public interface Condition { - - boolean isSatisfied() throws Exception; - } - - public interface LongCondition { - long getCount() throws Exception; - } - - public interface IntCondition { - int getCount() throws Exception; - } - - public static boolean waitFor(Condition condition) throws Exception { - return waitFor(condition, MAX_WAIT_MILLIS); - } - - - public static void assertEquals(long size, LongCondition condition) throws Exception { - assertEquals(size, condition, MAX_WAIT_MILLIS); - } - - public static void assertEquals(long size, LongCondition condition, long timeout) throws Exception { - assertEquals(size, condition, timeout, SLEEP_MILLIS); - } - - public static void assertEquals(Long size, LongCondition condition, long timeout, long sleepMillis) throws Exception { - boolean result = waitFor(() -> condition.getCount() == size, timeout, sleepMillis); - - if (!result) { - Assert.fail(size + " != " + condition.getCount()); - } - } - - - public static void assertEquals(int size, IntCondition condition) throws Exception { - assertEquals(size, condition, MAX_WAIT_MILLIS); - } - - public static void assertEquals(int size, IntCondition condition, long timeout) throws Exception { - assertEquals(size, condition, timeout, SLEEP_MILLIS); - } - - public static void assertEquals(int size, IntCondition condition, long timeout, long sleepMillis) throws Exception { - boolean result = waitFor(() -> condition.getCount() == size, timeout, sleepMillis); - - if (!result) { - Assert.fail(size + " != " + condition.getCount()); - } - } - - public static void assertTrue(Condition condition) throws Exception { - assertTrue("Condition wasn't met", condition); - } - - public static void assertFalse(Condition condition) throws Exception { - assertTrue(() -> !condition.isSatisfied()); - } - - public static void assertFalse(String failureMessage, Condition condition) throws Exception { - assertTrue(failureMessage, () -> !condition.isSatisfied()); - } - - - public static void assertTrue(String failureMessage, Condition condition) throws Exception { - assertTrue(failureMessage, condition, MAX_WAIT_MILLIS); - } - - public static void assertTrue(String failureMessage, Condition condition, final long duration) throws Exception { - assertTrue(failureMessage, condition, duration, SLEEP_MILLIS); - } - - public static void assertTrue(Condition condition, final long duration, final long sleep) throws Exception { - assertTrue("condition not met", condition, duration, sleep); - } - - - public static void assertTrue(String failureMessage, Condition condition, final long duration, final long sleep) throws Exception { - - boolean result = waitFor(condition, duration, sleep); - - if (!result) { - Assert.fail(failureMessage); - } - } - - public static boolean waitFor(final Condition condition, final long duration) throws Exception { - return waitFor(condition, duration, SLEEP_MILLIS); - } - - public static boolean waitFor(final Condition condition, - final long durationMillis, - final long sleepMillis) throws Exception { - - final long expiry = System.currentTimeMillis() + durationMillis; - boolean conditionSatisified = condition.isSatisfied(); - while (!conditionSatisified && System.currentTimeMillis() < expiry) { - TimeUnit.MILLISECONDS.sleep(sleepMillis); - conditionSatisified = condition.isSatisfied(); - } - return conditionSatisified; - } - - -} diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java index c37a10a428..eb0894b4b8 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQConsumerResourceTest.java @@ -50,14 +50,13 @@ public class ActiveMQConsumerResourceTest { ActiveMQConsumerResource consumer = new ActiveMQConsumerResource(server.getVmURL(), TEST_QUEUE); @Rule - public RuleChain ruleChain = RuleChain.outerRule(new ThreadLeakCheckRule()).outerRule(server).around(consumer); + public RuleChain ruleChain = RuleChain.outerRule(server).around(consumer); ClientMessage sent = null; @After public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_ADDRESS), sent); - Wait.assertEquals(1, () -> server.getMessageCount(TEST_QUEUE)); ClientMessage received = consumer.receiveMessage(); assertNotNull(String.format(ASSERT_RECEIVED_FORMAT, TEST_ADDRESS), received); diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceTest.java index cf7f84a9a9..b58c4fa67a 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceTest.java @@ -50,7 +50,7 @@ public class ActiveMQDynamicProducerResourceTest { ActiveMQDynamicProducerResource producer = new ActiveMQDynamicProducerResource(server.getVmURL(), TEST_QUEUE_ONE); @Rule - public RuleChain ruleChain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server).around(producer); + public RuleChain ruleChain = RuleChain.outerRule(server).around(producer); ClientMessage sentOne = null; ClientMessage sentTwo = null; @@ -59,8 +59,6 @@ public class ActiveMQDynamicProducerResourceTest { public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_QUEUE_ONE), sentOne); assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_QUEUE_TWO), sentTwo); - Wait.assertEquals(1L, () -> server.getMessageCount(TEST_QUEUE_ONE), 30_000, 10); - Wait.assertEquals(1L, () -> server.getMessageCount(TEST_QUEUE_TWO), 30_000, 10); ClientMessage receivedOne = server.receiveMessage(TEST_QUEUE_ONE); assertNotNull(String.format(ASSERT_RECEIVED_FORMAT, TEST_QUEUE_ONE), receivedOne); diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressExceptionTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressExceptionTest.java index 47e6a2b031..037bed5483 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressExceptionTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressExceptionTest.java @@ -49,7 +49,7 @@ public class ActiveMQDynamicProducerResourceWithoutAddressExceptionTest { } @Rule - public RuleChain ruleChain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server).around(producer); + public RuleChain ruleChain = RuleChain.outerRule(server).around(producer); ClientMessage sentOne = null; diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressTest.java index b945ea61df..bc2fcef58e 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQDynamicProducerResourceWithoutAddressTest.java @@ -51,7 +51,7 @@ public class ActiveMQDynamicProducerResourceWithoutAddressTest { ActiveMQDynamicProducerResource producer = new ActiveMQDynamicProducerResource(server.getVmURL()); @Rule - public RuleChain ruleChain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server).around(producer); + public RuleChain ruleChain = RuleChain.outerRule(server).around(producer); ClientMessage sentOne = null; ClientMessage sentTwo = null; @@ -67,8 +67,6 @@ public class ActiveMQDynamicProducerResourceWithoutAddressTest { public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_QUEUE_ONE), sentOne); assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_QUEUE_TWO), sentTwo); - Wait.assertEquals(1L, ()-> server.getMessageCount(TEST_QUEUE_ONE), 30_000, 10); - Wait.assertEquals(1L, ()-> server.getMessageCount(TEST_QUEUE_TWO), 30_000, 10); ClientMessage receivedOne = server.receiveMessage(TEST_QUEUE_ONE); assertNotNull(String.format(ASSERT_RECEIVED_FORMAT, TEST_QUEUE_ONE), receivedOne); diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQProducerResourceTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQProducerResourceTest.java index 82be91bb41..8d0394bfd7 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQProducerResourceTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/ActiveMQProducerResourceTest.java @@ -50,7 +50,7 @@ public class ActiveMQProducerResourceTest { ActiveMQProducerResource producer = new ActiveMQProducerResource(server.getVmURL(), TEST_ADDRESS); @Rule - public RuleChain ruleChain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server).around(producer); + public RuleChain ruleChain = RuleChain.outerRule(server).around(producer); ClientMessage sent = null; diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceCustomConfigurationTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceCustomConfigurationTest.java index 37cff8978a..e6613e23c0 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceCustomConfigurationTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceCustomConfigurationTest.java @@ -43,7 +43,7 @@ public class EmbeddedActiveMQResourceCustomConfigurationTest { private EmbeddedActiveMQResource server = new EmbeddedActiveMQResource(customConfiguration); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server); + public RuleChain rulechain = RuleChain.outerRule(server); @After public void tear() { diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceFileConfigurationTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceFileConfigurationTest.java index 077049b907..63bd4b67ec 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceFileConfigurationTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceFileConfigurationTest.java @@ -36,7 +36,7 @@ public class EmbeddedActiveMQResourceFileConfigurationTest { private EmbeddedActiveMQResource server = new EmbeddedActiveMQResource("embedded-artemis-server.xml"); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server); + public RuleChain rulechain = RuleChain.outerRule(server); @After public void tear() { diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceTest.java index 551a97027c..a41cfd0925 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedActiveMQResourceTest.java @@ -49,7 +49,7 @@ public class EmbeddedActiveMQResourceTest { public EmbeddedActiveMQResource server = new EmbeddedActiveMQResource(); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(server); + public RuleChain rulechain = RuleChain.outerRule(server); ClientMessage sent = null; @@ -61,7 +61,6 @@ public class EmbeddedActiveMQResourceTest { @After public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_SENT_FORMAT, TEST_ADDRESS), sent); - Wait.assertEquals(1L, () -> server.getMessageCount(TEST_QUEUE), 30_000, 10); ClientMessage received = server.receiveMessage(TEST_QUEUE); assertNotNull(String.format(ASSERT_RECEIVED_FORMAT, TEST_ADDRESS), received); diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceMultipleFileConfigurationTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceMultipleFileConfigurationTest.java index 868f2e4e76..89df055d0a 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceMultipleFileConfigurationTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceMultipleFileConfigurationTest.java @@ -46,7 +46,7 @@ public class EmbeddedJMSResourceMultipleFileConfigurationTest { public EmbeddedJMSResource jmsServer = new EmbeddedJMSResource("embedded-artemis-minimal-server.xml", "embedded-artemis-jms-only.xml"); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(jmsServer); + public RuleChain rulechain = RuleChain.outerRule(jmsServer); ConnectionFactory connectionFactory; Connection connection; diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceQueueTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceQueueTest.java index 0db347a657..03dc6fe1fd 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceQueueTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceQueueTest.java @@ -51,14 +51,13 @@ public class EmbeddedJMSResourceQueueTest { public EmbeddedJMSResource jmsServer = new EmbeddedJMSResource(); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(jmsServer); + public RuleChain rulechain = RuleChain.outerRule(jmsServer); Message pushed = null; @After public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_PUSHED_FORMAT, TEST_DESTINATION_NAME), pushed); - Wait.assertEquals(1L, () -> jmsServer.getMessageCount(TEST_DESTINATION_NAME), (long)30_000, (long)10); } @Test diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceSingleFileConfigurationTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceSingleFileConfigurationTest.java index 3cf0cb5f69..c67cc9fa7c 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceSingleFileConfigurationTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceSingleFileConfigurationTest.java @@ -46,7 +46,7 @@ public class EmbeddedJMSResourceSingleFileConfigurationTest { public EmbeddedJMSResource jmsServer = new EmbeddedJMSResource("embedded-artemis-jms-server.xml"); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(jmsServer); + public RuleChain rulechain = RuleChain.outerRule(jmsServer); ConnectionFactory connectionFactory; Connection connection; diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceTopicTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceTopicTest.java index af924bf027..b2d4765f70 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceTopicTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/EmbeddedJMSResourceTopicTest.java @@ -58,7 +58,7 @@ public class EmbeddedJMSResourceTopicTest { public EmbeddedJMSResource jmsServer = new EmbeddedJMSResource(); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(jmsServer); + public RuleChain rulechain = RuleChain.outerRule(jmsServer); Message pushed = null; @@ -79,7 +79,6 @@ public class EmbeddedJMSResourceTopicTest { @After public void tearDown() throws Exception { assertNotNull(String.format(ASSERT_PUSHED_FORMAT, TEST_DESTINATION_NAME), pushed); - Wait.assertEquals(1L, () -> jmsServer.getMessageCount(TEST_DESTINATION_NAME), (long)30_000, (long)10); consumer.close(); session.close(); diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedActiveMQResourcesTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedActiveMQResourcesTest.java index 2f9da05761..6712a0c9e7 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedActiveMQResourcesTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedActiveMQResourcesTest.java @@ -44,7 +44,7 @@ public class MultipleEmbeddedActiveMQResourcesTest { public EmbeddedActiveMQResource serverTwo = new EmbeddedActiveMQResource(1); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(serverOne).around(serverTwo); + public RuleChain rulechain = RuleChain.outerRule(serverOne).around(serverTwo); @Before public void setUp() throws Exception { diff --git a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedJMSResourcesTest.java b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedJMSResourcesTest.java index fe9d1758bd..053699c523 100644 --- a/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedJMSResourcesTest.java +++ b/artemis-junit/src/test/java/org/apache/activemq/artemis/junit/MultipleEmbeddedJMSResourcesTest.java @@ -40,7 +40,7 @@ public class MultipleEmbeddedJMSResourcesTest { public EmbeddedJMSResource jmsServerTwo = new EmbeddedJMSResource(1); @Rule - public RuleChain rulechain = RuleChain.outerRule(new ThreadLeakCheckRule()).around(jmsServerOne).around(jmsServerTwo); + public RuleChain rulechain = RuleChain.outerRule(jmsServerOne).around(jmsServerTwo); @Test public void testMultipleServers() throws Exception { @@ -52,8 +52,6 @@ public class MultipleEmbeddedJMSResourcesTest { Message pushedTwo = jmsServerTwo.pushMessage(TEST_QUEUE_TWO, TEST_BODY); assertNotNull(String.format(ASSERT_PUSHED_FORMAT, TEST_QUEUE_TWO), pushedTwo); - Wait.assertEquals(1L, () -> jmsServerOne.getMessageCount(TEST_QUEUE_ONE), 30_000, 10); - Wait.assertEquals(1L, () -> jmsServerTwo.getMessageCount(TEST_QUEUE_TWO), 30_000, 10); } } \ No newline at end of file diff --git a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java index ff2449c0b4..12050c50d7 100644 --- a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java +++ b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerCLITest.java @@ -34,9 +34,9 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.server.management.ManagementContext; import org.apache.activemq.artemis.nativo.jlibaio.LibaioContext; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader; import org.apache.activemq.artemis.utils.ThreadLeakCheckRule; +import org.apache.activemq.artemis.utils.Wait; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java index 7f2326cce3..eefa6a9c61 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/HornetQSoakTest.java @@ -20,10 +20,10 @@ package org.apache.activemq.artemis.tests.compatibility; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.compatibility.base.ClasspathBase; import org.apache.activemq.artemis.utils.FileUtil; import org.apache.activemq.artemis.utils.ReusableLatch; +import org.apache.activemq.artemis.utils.Wait; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactedRedeliveryBugTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactedRedeliveryBugTest.java index 9066a20b5e..9bbb62dc9f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactedRedeliveryBugTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactedRedeliveryBugTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Test; public class JMSTransactedRedeliveryBugTest extends JMSClientTestSupport { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/interop/AmqpCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/interop/AmqpCoreTest.java index 5d07d2a83d..ef203845bc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/interop/AmqpCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/interop/AmqpCoreTest.java @@ -22,7 +22,7 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage; import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.MessageHandler; import org.apache.activemq.artemis.jms.client.ActiveMQSession; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.amqp.JMSClientTestSupport; import org.apache.qpid.jms.JmsConnectionFactory; import org.apache.qpid.jms.JmsTopic; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java index f32c6fee13..a2855434f2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java @@ -46,7 +46,7 @@ import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQQueue; import org.apache.activemq.artemis.jms.client.ActiveMQTemporaryTopic; import org.apache.activemq.artemis.jms.client.ActiveMQTopic; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.JMSTestBase; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FullQualifiedQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FullQualifiedQueueTest.java index 8932153052..5cbfea7471 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FullQualifiedQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FullQualifiedQueueTest.java @@ -185,19 +185,19 @@ public class FullQualifiedQueueTest extends ActiveMQTestBase { for (int i = 0; i < 2; i++) { producer1.send(session.createMessage(false)); } - assertTrue(org.apache.activemq.artemis.junit.Wait.waitFor(() -> server.locateQueue(anycastQ1).getMessageCount() == 2, 2000, 200)); + assertTrue(org.apache.activemq.artemis.tests.util.Wait.waitFor(() -> server.locateQueue(anycastQ1).getMessageCount() == 2, 2000, 200)); ClientProducer producer2 = session.createProducer(CompositeAddress.toFullyQualified(anycastAddress, anycastQ2).toString()); for (int i = 0; i < 3; i++) { producer2.send(session.createMessage(false)); } - assertTrue(org.apache.activemq.artemis.junit.Wait.waitFor(() -> server.locateQueue(anycastQ2).getMessageCount() == 3, 2000, 200)); + assertTrue(org.apache.activemq.artemis.tests.util.Wait.waitFor(() -> server.locateQueue(anycastQ2).getMessageCount() == 3, 2000, 200)); ClientProducer producer3 = session.createProducer(CompositeAddress.toFullyQualified(anycastAddress, anycastQ3).toString()); for (int i = 0; i < 5; i++) { producer3.send(session.createMessage(false)); } - assertTrue(org.apache.activemq.artemis.junit.Wait.waitFor(() -> server.locateQueue(anycastQ3).getMessageCount() == 5, 2000, 200)); + assertTrue(org.apache.activemq.artemis.tests.util.Wait.waitFor(() -> server.locateQueue(anycastQ3).getMessageCount() == 5, 2000, 200)); ClientConsumer consumer1 = session.createConsumer(CompositeAddress.toFullyQualified(anycastAddress, anycastQ1)); ClientConsumer consumer2 = session.createConsumer(CompositeAddress.toFullyQualified(anycastAddress, anycastQ2)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientTestBase.java index 50c34b8de9..0c9c0eb7e1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/ClientTestBase.java @@ -18,7 +18,7 @@ package org.apache.activemq.artemis.tests.integration.clientcrash; import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.util.SpawnedTestBase; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/crossprotocol/ProtocolsMessageLoadBalancingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/crossprotocol/ProtocolsMessageLoadBalancingTest.java index fc11e601d6..c6624def38 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/crossprotocol/ProtocolsMessageLoadBalancingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/crossprotocol/ProtocolsMessageLoadBalancingTest.java @@ -44,7 +44,7 @@ import org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImp import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.protocol.amqp.broker.ProtonProtocolManagerFactory; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java index 04bb19e0e7..888fe3fc9a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java @@ -17,7 +17,7 @@ package org.apache.activemq.artemis.tests.integration.cluster.distribution; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/RemoteBindingWithoutLoadBalancingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/RemoteBindingWithoutLoadBalancingTest.java index 0322f38359..595409304f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/RemoteBindingWithoutLoadBalancingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/RemoteBindingWithoutLoadBalancingTest.java @@ -25,7 +25,7 @@ import javax.jms.Session; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ExtraBackupReplicatedFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ExtraBackupReplicatedFailoverTest.java index 77cdf825a6..3d9961383b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ExtraBackupReplicatedFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ExtraBackupReplicatedFailoverTest.java @@ -21,7 +21,7 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer; import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils; import org.junit.Rule; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveCrashOnBackupSyncTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveCrashOnBackupSyncTest.java index 0c3ace71fd..c788700238 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveCrashOnBackupSyncTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveCrashOnBackupSyncTest.java @@ -44,7 +44,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.JournalType; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager; import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveVoteOnBackupFailureClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveVoteOnBackupFailureClusterTest.java index 546415acb4..71281e6a40 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveVoteOnBackupFailureClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveVoteOnBackupFailureClusterTest.java @@ -25,7 +25,7 @@ import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.remoting.FailureListener; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.util.BackupSyncDelay; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java index 0775e08523..c13e2a7349 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java @@ -35,7 +35,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServerLogger; import org.apache.activemq.artemis.core.server.NodeManager; import org.apache.activemq.artemis.core.server.Queue; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.util.SameProcessActiveMQServer; import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NetworkFailureFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NetworkFailureFailoverTest.java index c2e539fb4d..2844162bec 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NetworkFailureFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NetworkFailureFailoverTest.java @@ -42,7 +42,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSess import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.util.network.NetUtil; import org.apache.activemq.artemis.tests.util.network.NetUtilResource; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java index 93c0db5bc5..dedf57ae33 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java @@ -24,7 +24,7 @@ import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.util.BackupSyncDelay; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicaTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicaTimeoutTest.java index c1ba9d386a..df3e2b802c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicaTimeoutTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicaTimeoutTest.java @@ -40,7 +40,7 @@ import org.apache.activemq.artemis.core.server.NodeManager; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.server.impl.InVMNodeManager; import org.apache.activemq.artemis.core.server.impl.SharedNothingBackupActivation; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.logs.AssertionLoggerHandler; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.integration.cluster.util.SameProcessActiveMQServer; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java index 01a3ba64b4..f7dffe1f00 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java @@ -34,7 +34,7 @@ import org.apache.activemq.artemis.core.server.ServiceComponent; import org.apache.activemq.artemis.core.server.cluster.ha.ReplicatedPolicy; import org.apache.activemq.artemis.dto.AppDTO; import org.apache.activemq.artemis.dto.WebServerDTO; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java index 61e140d5d9..00ffa51776 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedMultipleServerFailoverExtraBackupsTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.api.core.client.FailoverEventType; import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer; import org.junit.Assert; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java index c78620ef7e..643d10361c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java @@ -47,7 +47,7 @@ import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.utils.ReusableLatch; import org.junit.Assert; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ExpiryMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ExpiryMessageTest.java index 53a3637fc1..3bd36383ab 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ExpiryMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ExpiryMessageTest.java @@ -25,7 +25,7 @@ import javax.jms.Topic; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.management.AddressControl; import org.apache.activemq.artemis.core.config.Configuration; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper; import org.apache.activemq.artemis.tests.util.JMSTestBase; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java index 5728d30338..ccfc42c89b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerForConnectionTimedOutExceptionTest.java @@ -30,7 +30,7 @@ import org.apache.activemq.artemis.api.core.Interceptor; import org.apache.activemq.artemis.core.protocol.core.Packet; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.tests.util.JMSTestBase; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java index 2f0e351ea7..40c5f6013b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSConfigurationTest.java @@ -43,9 +43,9 @@ import org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl; import org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl; import org.apache.activemq.artemis.jms.server.config.impl.TopicConfigurationImpl; import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.utils.RandomUtil; import org.apache.activemq.transport.netty.NettyTransport; import org.apache.activemq.transport.netty.NettyTransportFactory; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java index 049ca01efc..15b01b872a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java @@ -67,7 +67,7 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.impl.QueueImpl; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.core.transaction.impl.XidImpl; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.jms.server.management.JMSUtil; import org.apache.activemq.artemis.utils.Base64; import org.apache.activemq.artemis.utils.RandomUtil; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/FQQNOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/FQQNOpenWireTest.java index 36fcc5c4cb..bb0fb3077a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/FQQNOpenWireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/FQQNOpenWireTest.java @@ -40,7 +40,7 @@ import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding; import org.apache.activemq.artemis.core.server.QueueQueryResult; import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.utils.CompositeAddress; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java index 7451288e44..870bb141ba 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/GlobalPagingTest.java @@ -46,7 +46,7 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingReceiveTest.java index 140b35fb56..f8deac5f0d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingReceiveTest.java @@ -32,8 +32,8 @@ import org.apache.activemq.artemis.api.core.RoutingType; import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.tests.util.Wait; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java index 7bad3099de..e423856e77 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java @@ -40,8 +40,8 @@ import org.apache.activemq.artemis.core.server.Queue; import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQTextMessage; -import org.apache.activemq.artemis.junit.Wait.Condition; -import org.apache.activemq.artemis.tests.util.Wait; +import org.apache.activemq.artemis.utils.Wait; +import org.apache.activemq.artemis.utils.Wait.Condition; import org.apache.commons.lang.StringUtils; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MetricsPluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MetricsPluginTest.java index 4a08032730..7d7482ca1c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MetricsPluginTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MetricsPluginTest.java @@ -34,7 +34,7 @@ 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.metrics.plugins.SimpleMetricsPlugin; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java index 8fca5774b9..54aae6ea23 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java @@ -67,7 +67,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.JournalType; import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager; import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java index e6e997f3f8..7cd4b05de9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationTest.java @@ -45,7 +45,7 @@ import org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordId import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; import org.apache.activemq.artemis.core.server.JournalType; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.jboss.logging.Logger; import org.junit.After; 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 0932482368..8b894b0454 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 @@ -27,7 +27,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.impl.AddressInfo; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.utils.RandomUtil; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/MessageExpirationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/MessageExpirationTest.java index 17609083ce..4570e3c43b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/MessageExpirationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/MessageExpirationTest.java @@ -25,8 +25,8 @@ 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.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.utils.RandomUtil; import org.junit.Assert; import org.junit.Before; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/QueueQueryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/QueueQueryTest.java index b748733b6d..6de91a46d1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/QueueQueryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/QueueQueryTest.java @@ -27,7 +27,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.QueueQueryResult; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.junit.Before; import org.junit.Test; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java index c9869108c9..9f8c47f98f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java @@ -46,7 +46,7 @@ import org.apache.activemq.artemis.core.server.cluster.ClusterController; import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; import org.apache.activemq.artemis.core.server.impl.QueueImpl; import org.apache.activemq.artemis.core.settings.impl.AddressSettings; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.junit.Assert; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWebSocketMaxFrameTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWebSocketMaxFrameTest.java index 8bdf2f78f2..bc580cc149 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWebSocketMaxFrameTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWebSocketMaxFrameTest.java @@ -20,7 +20,7 @@ import java.net.URI; import java.util.Arrays; import java.util.Collection; -import org.apache.activemq.artemis.junit.Wait; +import org.apache.activemq.artemis.tests.util.Wait; import org.apache.activemq.artemis.tests.integration.stomp.util.ClientStompFrame; import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnection; import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnectionFactory; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/Wait.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/Wait.java index 5781f119e2..1b7abb7448 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/Wait.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/Wait.java @@ -19,6 +19,6 @@ package org.apache.activemq.artemis.tests.util; /** * Utility adapted from: org.apache.activemq.util.Wait */ -public class Wait extends org.apache.activemq.artemis.junit.Wait { +public class Wait extends org.apache.activemq.artemis.utils.Wait { } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java index c2f0f588bc..606bb5eb63 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java @@ -46,8 +46,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.Wait; import org.junit.Assert; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java index 517fcf0052..f9e75af81c 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java @@ -33,11 +33,11 @@ import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo; import org.apache.activemq.artemis.core.journal.RecordInfo; import org.apache.activemq.artemis.core.journal.TransactionFailureCallback; import org.apache.activemq.artemis.core.journal.impl.JournalImpl; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.unit.UnitTestLogger; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.Wait; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalFileRepositoryOrderTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalFileRepositoryOrderTest.java index e223f0906f..f20eb5eacd 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalFileRepositoryOrderTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalFileRepositoryOrderTest.java @@ -27,10 +27,10 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.activemq.artemis.core.journal.impl.JournalFile; import org.apache.activemq.artemis.core.journal.impl.JournalFilesRepository; import org.apache.activemq.artemis.core.journal.impl.JournalImpl; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.utils.ActiveMQThreadFactory; +import org.apache.activemq.artemis.utils.Wait; import org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory; import org.junit.Assert; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java index 9fd44698e5..0e0ded8e54 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/message/impl/MessageImplTest.java @@ -35,9 +35,9 @@ import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.message.impl.CoreMessage; import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendMessage; import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.apache.activemq.artemis.utils.RandomUtil; +import org.apache.activemq.artemis.utils.Wait; import org.junit.Assert; import org.junit.Test; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyHandshakeTimeoutTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyHandshakeTimeoutTest.java index 515a8935e8..24ed8eaf3e 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyHandshakeTimeoutTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyHandshakeTimeoutTest.java @@ -27,8 +27,8 @@ import org.apache.activemq.artemis.core.config.Configuration; import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; import org.apache.activemq.artemis.core.server.ActiveMQServer; import org.apache.activemq.artemis.core.server.ActiveMQServers; -import org.apache.activemq.artemis.junit.Wait; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.apache.activemq.artemis.utils.Wait; import org.apache.activemq.transport.netty.NettyTransport; import org.apache.activemq.transport.netty.NettyTransportFactory; import org.apache.activemq.transport.netty.NettyTransportListener;