activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/5] activemq-artemis git commit: ARTEMIS-883 fixing tests
Date Wed, 21 Dec 2016 17:06:57 GMT
ARTEMIS-883 fixing tests


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8941f2b1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8941f2b1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8941f2b1

Branch: refs/heads/master
Commit: 8941f2b15d9721d76ee5c788eabf08cd302bb63f
Parents: 81df93e
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Dec 21 11:40:06 2016 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Dec 21 12:04:06 2016 -0500

----------------------------------------------------------------------
 .../tests/integration/openwire/BasicOpenWireTest.java   |  8 ++++++--
 .../openwire/amq/ProducerFlowControlTest.java           |  2 +-
 .../openwire/interop/CompressedInteropTest.java         | 12 +++++++++++-
 3 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8941f2b1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
----------------------------------------------------------------------
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 d01e237..66805d1 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;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8941f2b1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java
----------------------------------------------------------------------
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 d372c46..c085d0f 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

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8941f2b1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/interop/CompressedInteropTest.java
----------------------------------------------------------------------
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 5f2c621..337027b 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


Mime
View raw message