activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [38/50] [abbrv] activemq-artemis git commit: fix some tests
Date Mon, 07 Nov 2016 16:36:58 GMT
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 <mtaylor@redhat.com>
Authored: Mon Nov 7 12:19:52 2016 +0000
Committer: Clebert Suconic <clebertsuconic@apache.org>
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();


Mime
View raw message