Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 11D33200BE4 for ; Wed, 21 Dec 2016 18:06:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1087F160B3D; Wed, 21 Dec 2016 17:06:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 63ED1160B26 for ; Wed, 21 Dec 2016 18:06:57 +0100 (CET) Received: (qmail 81602 invoked by uid 500); 21 Dec 2016 17:06:56 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 81584 invoked by uid 99); 21 Dec 2016 17:06:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2016 17:06:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5B6F2DFDF1; Wed, 21 Dec 2016 17:06:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Wed, 21 Dec 2016 17:06:57 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/5] activemq-artemis git commit: ARTEMIS-883 fixing tests archived-at: Wed, 21 Dec 2016 17:06:58 -0000 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 Authored: Wed Dec 21 11:40:06 2016 -0500 Committer: Clebert Suconic 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