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 BC203200BB9 for ; Mon, 7 Nov 2016 17:36:26 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BAF34160B16; Mon, 7 Nov 2016 16:36:26 +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 68342160B1F for ; Mon, 7 Nov 2016 17:36:25 +0100 (CET) Received: (qmail 26366 invoked by uid 500); 7 Nov 2016 16:36:24 -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 24290 invoked by uid 99); 7 Nov 2016 16:36:22 -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; Mon, 07 Nov 2016 16:36:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 38E68EEE7B; Mon, 7 Nov 2016 16:36:22 +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: Mon, 07 Nov 2016 16:36:58 -0000 Message-Id: <5c7b2df740254cd2838d96d04d53816b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [38/50] [abbrv] activemq-artemis git commit: fix some tests archived-at: Mon, 07 Nov 2016 16:36:26 -0000 fix some 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/63b5a589 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/63b5a589 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/63b5a589 Branch: refs/heads/ARTEMIS-780 Commit: 63b5a589aabeca9df438ccd929cb375bd6eaa68d Parents: d994fd0 Author: Martyn Taylor Authored: Mon Nov 7 12:19:52 2016 +0000 Committer: Clebert Suconic Committed: Mon Nov 7 11:29:24 2016 -0500 ---------------------------------------------------------------------- .../integration/crossprotocol/AMQPToOpenwireTest.java | 13 ++++++------- .../tests/integration/mqtt/imported/MQTTTest.java | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/63b5a589/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java index 0374aef..0bc3e28 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java @@ -26,6 +26,7 @@ import javax.jms.Session; import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; import java.util.ArrayList; +import java.util.concurrent.TimeUnit; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQXAConnectionFactory; @@ -60,23 +61,21 @@ public class AMQPToOpenwireTest extends ActiveMQTestBase { public void setUp() throws Exception { super.setUp(); server = createServer(true, true); - serverManager = new JMSServerManagerImpl(server); + server.start(); + server.waitForActivation(10, TimeUnit.SECONDS); + Configuration serverConfig = server.getConfiguration(); serverConfig.getAddressesSettings().put("#", new AddressSettings().setAutoCreateJmsQueues(false).setDeadLetterAddress(new SimpleString("ActiveMQ.DLQ"))); serverConfig.setSecurityEnabled(false); - serverManager.start(); coreQueue = new SimpleString(queueName); - this.server.createQueue(coreQueue, coreQueue, null, false, false); + server.createQueue(coreQueue, coreQueue, null, false, false); qpidfactory = new JmsConnectionFactory("amqp://localhost:61616"); } @Override @After public void tearDown() throws Exception { - if (serverManager != null) { - serverManager.stop(); - serverManager = null; - } + server.stop(); } @Test http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/63b5a589/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java index 486c2d5..00d220b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java @@ -1042,7 +1042,7 @@ public class MQTTTest extends MQTTTestSupport { initializeConnection(provider); // send retained message - final String address = "jms/queue/" + mqttAddress; + final String address = mqttAddress; final String RETAINED = "RETAINED"; final byte[] payload = RETAINED.getBytes(); @@ -1088,7 +1088,7 @@ public class MQTTTest extends MQTTTestSupport { public void doTestSendJMSReceiveMQTT(String destinationName) throws Exception { final MQTTClientProvider provider = getMQTTClientProvider(); initializeConnection(provider); - provider.subscribe("jms/queue/foo/+", AT_MOST_ONCE); + provider.subscribe("foo/+", AT_MOST_ONCE); Connection connection = cf.createConnection(); connection.start(); @@ -1279,7 +1279,7 @@ public class MQTTTest extends MQTTTestSupport { // publish for (int i = 0; i < messagesToSend; ++i) { - connection.publish("jms/queue/test/foo", "hello world".getBytes(), QoS.AT_LEAST_ONCE, false); + connection.publish("test/foo", "hello world".getBytes(), QoS.AT_LEAST_ONCE, false); } connection.disconnect();