diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java index d01e237bd6..66805d1d28 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java @@ -65,8 +65,7 @@ public class BasicOpenWireTest extends OpenWireTestBase { public void setUp() throws Exception { super.setUp(); System.setProperty("org.apache.activemq.transport.AbstractInactivityMonitor.keepAliveTime", "5"); - factory = new ActiveMQConnectionFactory(getConnectionUrl()); - xaFactory = new ActiveMQXAConnectionFactory(getConnectionUrl()); + createFactories(); SimpleString coreQueue = new SimpleString(queueName); this.server.createQueue(coreQueue, RoutingType.ANYCAST, coreQueue, null, false, false, -1, false, true); testQueues.put(queueName, coreQueue); @@ -84,6 +83,11 @@ public class BasicOpenWireTest extends OpenWireTestBase { } } + protected void createFactories() { + factory = new ActiveMQConnectionFactory(getConnectionUrl()); + xaFactory = new ActiveMQXAConnectionFactory(getConnectionUrl()); + } + protected String getConnectionUrl() { return urlString; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java index d372c463b4..c085d0f710 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java @@ -282,7 +282,7 @@ public class ProducerFlowControlTest extends BasicOpenWireTest { protected void waitForBlockedOrResourceLimit(final AtomicBoolean done) throws InterruptedException { while (true) { - Thread.sleep(2000); + Thread.sleep(100); System.out.println("check done: " + done.get() + " ex: " + gotResourceException.get()); // the producer is blocked once the done flag stays true or there is a // resource exception diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/interop/CompressedInteropTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/interop/CompressedInteropTest.java index 5f2c621830..337027be5e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/interop/CompressedInteropTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/interop/CompressedInteropTest.java @@ -28,7 +28,9 @@ import javax.jms.StreamMessage; import javax.jms.TextMessage; import java.nio.charset.StandardCharsets; +import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQMessageProducer; +import org.apache.activemq.ActiveMQXAConnectionFactory; import org.apache.activemq.artemis.tests.integration.openwire.BasicOpenWireTest; import org.apache.activemq.command.ActiveMQDestination; import org.junit.Before; @@ -50,12 +52,20 @@ public class CompressedInteropTest extends BasicOpenWireTest { @Before @Override public void setUp() throws Exception { - factory.setUseCompression(true); super.setUp(); connection.start(); assertTrue(connection.isUseCompression()); } + + @Override + protected void createFactories() { + super.createFactories(); + factory.setUseCompression(true); + xaFactory.setUseCompression(true); + } + + @Test public void testCoreReceiveOpenWireCompressedMessages() throws Exception { //TextMessage