activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1282 ClientSession.ceateQueue (String) method is using temporary queues
Date Tue, 11 Jul 2017 23:26:09 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 24d0a6c8f -> 36357e455


ARTEMIS-1282 ClientSession.ceateQueue (String) method is using temporary queues


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

Branch: refs/heads/master
Commit: 36357e4556efcd01525bb28b2d0afd8b41ab3323
Parents: 24d0a6c
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Jul 11 19:24:22 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Jul 11 19:24:22 2017 -0400

----------------------------------------------------------------------
 .../core/client/impl/ClientSessionImpl.java        |  2 +-
 .../integration/client/JmsNettyNioStressTest.java  | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/36357e45/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
index 4937397..29b9504 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
@@ -531,7 +531,7 @@ public final class ClientSessionImpl implements ClientSessionInternal,
FailureLi
                           SimpleString.toSimpleString(queueName), routingType,
                           null,
                           false,
-                          true,
+                          false,
                           ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers(),
                           ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers(),
                           false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/36357e45/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JmsNettyNioStressTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JmsNettyNioStressTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JmsNettyNioStressTest.java
index 1113e4b..afc6420 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JmsNettyNioStressTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JmsNettyNioStressTest.java
@@ -38,6 +38,8 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactor
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
+import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
@@ -95,6 +97,15 @@ public class JmsNettyNioStressTest extends ActiveMQTestBase {
       TransportConfiguration transportConfig = new TransportConfiguration(ActiveMQTestBase.NETTY_ACCEPTOR_FACTORY,
params);
       Configuration config = createBasicConfig().setJMXManagementEnabled(false).clearAcceptorConfigurations().addAcceptorConfiguration(transportConfig);
       ActiveMQServer server = createServer(true, config);
+
+
+      server.getAddressSettingsRepository().clear();
+      AddressSettings defaultSetting = new AddressSettings().setPageSizeBytes(AddressSettings.DEFAULT_PAGE_SIZE).
+         setMaxSizeBytes(AddressSettings.DEFAULT_MAX_SIZE_BYTES).setAddressFullMessagePolicy(AddressFullMessagePolicy.PAGE).
+         setAutoDeleteAddresses(false).setAutoCreateAddresses(true).setAutoCreateQueues(false);
+
+      server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
       server.getConfiguration().setThreadPoolMaxSize(2);
       server.start();
 
@@ -133,8 +144,13 @@ public class JmsNettyNioStressTest extends ActiveMQTestBase {
       ClientSession session = sf.createTransactedSession();
       session.createAddress(SimpleString.toSimpleString("queue"), RoutingType.ANYCAST, false);
       session.createAddress(SimpleString.toSimpleString("queue2"), RoutingType.ANYCAST, false);
+
+      Assert.assertTrue(session.addressQuery(SimpleString.toSimpleString("queue")).isExists());
+      Assert.assertTrue(session.addressQuery(SimpleString.toSimpleString("queue2")).isExists());
       session.createQueue("queue", RoutingType.ANYCAST, "queue");
       session.createQueue("queue2", RoutingType.ANYCAST, "queue2");
+      Assert.assertTrue(session.addressQuery(SimpleString.toSimpleString("queue")).isExists());
+      Assert.assertTrue(session.addressQuery(SimpleString.toSimpleString("queue2")).isExists());
       session.commit();
       sf.close();
       session.close();
@@ -151,6 +167,7 @@ public class JmsNettyNioStressTest extends ActiveMQTestBase {
       connectionConsumer = cf.createConnection();
       connectionConsumer.start();
 
+      session.close();
       // these threads produce messages on the the first queue
       for (int i = 0; i < numProducers; i++) {
          new Thread() {


Mime
View raw message