You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by an...@apache.org on 2016/05/25 15:32:06 UTC
[2/4] activemq-artemis git commit: Adding JORAM Tests for AMQP with a
few fixes around the protocol manager for JMS
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java
deleted file mode 100644
index 9088758..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.objectweb.jtests.jms.admin.Admin;
-
-/**
- * AbstractAdmin.
- */
-public class AbstractAdmin implements Admin {
-
- @Override
- public String getName() {
- return getClass().getName();
- }
-
- @Override
- public void start() {
- }
-
- @Override
- public void stop() throws Exception {
-
- }
-
- @Override
- public InitialContext createContext() throws NamingException {
- return new InitialContext();
- }
-
- @Override
- public void createConnectionFactory(final String name) {
- throw new RuntimeException("FIXME NYI createConnectionFactory");
- }
-
- @Override
- public void deleteConnectionFactory(final String name) {
- throw new RuntimeException("FIXME NYI deleteConnectionFactory");
- }
-
- @Override
- public void createQueue(final String name) {
- throw new RuntimeException("FIXME NYI createQueue");
- }
-
- @Override
- public void deleteQueue(final String name) {
- throw new RuntimeException("FIXME NYI deleteQueue");
- }
-
- @Override
- public void createQueueConnectionFactory(final String name) {
- createConnectionFactory(name);
- }
-
- @Override
- public void deleteQueueConnectionFactory(final String name) {
- deleteConnectionFactory(name);
- }
-
- @Override
- public void createTopic(final String name) {
- throw new RuntimeException("FIXME NYI createTopic");
- }
-
- @Override
- public void deleteTopic(final String name) {
- throw new RuntimeException("FIXME NYI deleteTopic");
- }
-
- @Override
- public void createTopicConnectionFactory(final String name) {
- createConnectionFactory(name);
- }
-
- @Override
- public void deleteTopicConnectionFactory(final String name) {
- deleteConnectionFactory(name);
- }
-
- @Override
- public void startServer() {
- }
-
- @Override
- public void stopServer() {
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java
deleted file mode 100644
index 27d2a46..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.Hashtable;
-
-import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.api.core.client.ClientMessage;
-import org.apache.activemq.artemis.api.core.client.ClientRequestor;
-import org.apache.activemq.artemis.api.core.client.ClientSession;
-import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
-import org.apache.activemq.artemis.api.core.client.ServerLocator;
-import org.apache.activemq.artemis.api.core.management.ManagementHelper;
-import org.apache.activemq.artemis.api.core.management.ResourceNames;
-import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
-import org.apache.activemq.artemis.tests.util.SpawnedVMSupport;
-import org.junit.Assert;
-import org.objectweb.jtests.jms.admin.Admin;
-
-public class ActiveMQAdmin implements Admin {
-
- private ClientSession clientSession;
-
- private ClientRequestor requestor;
-
- private Context context;
-
- private Process serverProcess;
-
- private ClientSessionFactory sf;
-
- ServerLocator serverLocator;
- /**
- * Determines whether to act or 'no-op' on {@link ActiveMQAdmin#serverStart()} and
- * {@link ActiveMQAdmin#serverStop()}. This is used when testing combinations of client and
- * servers with different versions.
- *
- * @see https://github.com/activemq/activemq-version-tests
- */
- private final boolean serverLifeCycleActive;
- private static final String SERVER_LIVE_CYCLE_PROPERTY = "org.apache.activemq.artemis.jms.ActiveMQAdmin.serverLifeCycle";
-
- public ActiveMQAdmin() {
- serverLifeCycleActive = Boolean.valueOf(System.getProperty(SERVER_LIVE_CYCLE_PROPERTY, "true"));
- try {
- Hashtable<String, String> env = new Hashtable<>();
- env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
- env.put("java.naming.provider.url", "tcp://localhost:61616");
- context = new InitialContext(env);
- }
- catch (NamingException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void start() throws Exception {
- serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName()));
- sf = serverLocator.createSessionFactory();
- clientSession = sf.createSession(ActiveMQDefaultConfiguration.getDefaultClusterUser(), ActiveMQDefaultConfiguration.getDefaultClusterPassword(), false, true, true, false, 1);
- requestor = new ClientRequestor(clientSession, ActiveMQDefaultConfiguration.getDefaultManagementAddress());
- clientSession.start();
-
- }
-
- @Override
- public void stop() throws Exception {
- requestor.close();
-
- if (sf != null) {
- sf.close();
- }
-
- if (serverLocator != null) {
- serverLocator.close();
- }
-
- sf = null;
- serverLocator = null;
- }
-
- @Override
- public void createConnectionFactory(final String name) {
- createConnection(name, 0);
- }
-
- private void createConnection(final String name, final int cfType) {
- try {
- invokeSyncOperation(ResourceNames.JMS_SERVER, "createConnectionFactory", name, false, false, cfType, "netty", name);
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
-
- }
-
- @Override
- public Context createContext() throws NamingException {
- return context;
- }
-
- @Override
- public void createQueue(final String name) {
- Boolean result;
- try {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createQueue", name, name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void createQueueConnectionFactory(final String name) {
- createConnection(name, 1);
- }
-
- @Override
- public void createTopic(final String name) {
- Boolean result;
- try {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createTopic", name, name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void createTopicConnectionFactory(final String name) {
- createConnection(name, 2);
- }
-
- @Override
- public void deleteConnectionFactory(final String name) {
- try {
- invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name);
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void deleteQueue(final String name) {
- Boolean result;
- try {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyQueue", name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void deleteQueueConnectionFactory(final String name) {
- deleteConnectionFactory(name);
- }
-
- @Override
- public void deleteTopic(final String name) {
- Boolean result;
- try {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyTopic", name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void deleteTopicConnectionFactory(final String name) {
- deleteConnectionFactory(name);
- }
-
- @Override
- public String getName() {
- return this.getClass().getName();
- }
-
- @Override
- public void startServer() throws Exception {
- if (!serverLifeCycleActive) {
- return;
- }
-
- String[] vmArgs = new String[]{};
- serverProcess = SpawnedVMSupport.spawnVM(SpawnedJMSServer.class.getName(), vmArgs, false);
- InputStreamReader isr = new InputStreamReader(serverProcess.getInputStream());
-
- final BufferedReader br = new BufferedReader(isr);
- String line = null;
- while ((line = br.readLine()) != null) {
- System.out.println("SERVER: " + line);
- if ("OK".equals(line.trim())) {
- new Thread() {
- @Override
- public void run() {
- try {
- String line1 = null;
- while ((line1 = br.readLine()) != null) {
- System.out.println("SERVER: " + line1);
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- }.start();
- return;
- }
- else if ("KO".equals(line.trim())) {
- // something went wrong with the server, destroy it:
- serverProcess.destroy();
- throw new IllegalStateException("Unable to start the spawned server :" + line);
- }
- }
- }
-
- @Override
- public void stopServer() throws Exception {
- if (!serverLifeCycleActive) {
- return;
- }
- OutputStreamWriter osw = new OutputStreamWriter(serverProcess.getOutputStream());
- osw.write("STOP\n");
- osw.flush();
- int exitValue = serverProcess.waitFor();
- if (exitValue != 0) {
- serverProcess.destroy();
- }
- }
-
- private Object invokeSyncOperation(final String resourceName,
- final String operationName,
- final Object... parameters) throws Exception {
- ClientMessage message = clientSession.createMessage(false);
- ManagementHelper.putOperationInvocation(message, resourceName, operationName, parameters);
- ClientMessage reply;
- try {
- reply = requestor.request(message, 3000);
- }
- catch (Exception e) {
- throw new IllegalStateException("Exception while invoking " + operationName + " on " + resourceName, e);
- }
- if (reply == null) {
- throw new IllegalStateException("no reply received when invoking " + operationName + " on " + resourceName);
- }
- if (!ManagementHelper.hasOperationSucceeded(reply)) {
- throw new IllegalStateException("operation failed when invoking " + operationName +
- " on " +
- resourceName +
- ": " +
- ManagementHelper.getResult(reply));
- }
- return ManagementHelper.getResult(reply);
- }
-
- // Inner classes -------------------------------------------------
-
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQCoreAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQCoreAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQCoreAdmin.java
new file mode 100644
index 0000000..aca9551
--- /dev/null
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQCoreAdmin.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.jms;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.Hashtable;
+
+import org.apache.activemq.artemis.api.core.management.ResourceNames;
+import org.apache.activemq.artemis.common.AbstractAdmin;
+import org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory;
+
+public class ActiveMQCoreAdmin extends AbstractAdmin {
+
+ private Context context;
+
+ Hashtable<String, String> jndiProps = new Hashtable<>();
+
+
+
+ public ActiveMQCoreAdmin() {
+ super();
+ jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ try {
+ Hashtable<String, String> env = new Hashtable<>();
+ env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
+ env.put("java.naming.provider.url", "tcp://localhost:61616");
+ context = new InitialContext(env);
+ }
+ catch (NamingException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void start() throws Exception {
+ super.start();
+
+ }
+
+ @Override
+ public void stop() throws Exception {
+ super.stop();
+ }
+
+ @Override
+ public void createConnectionFactory(final String name) {
+ createConnection(name, 0);
+ jndiProps.put("connectionFactory." + name, "tcp://127.0.0.1:61616?type=CF");
+
+ }
+
+ private void createConnection(final String name, final int cfType) {
+ try {
+ invokeSyncOperation(ResourceNames.JMS_SERVER, "createConnectionFactory", name, false, false, cfType, "netty", name);
+ }
+ catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+
+ }
+
+ @Override
+ public Context createContext() throws NamingException {
+ return new InitialContext(jndiProps);
+ }
+
+ @Override
+ public void createQueue(final String name) {
+ super.createQueue(name);
+ jndiProps.put("queue." + name, name);
+ }
+
+ @Override
+ public void createQueueConnectionFactory(final String name) {
+ createConnection(name, 1);
+ jndiProps.put("connectionFactory." + name, "tcp://127.0.0.1:61616?type=QUEUE_CF");
+ }
+
+ @Override
+ public void createTopic(final String name) {
+ super.createTopic(name);
+ jndiProps.put("topic." + name, name);
+ }
+
+ @Override
+ public void createTopicConnectionFactory(final String name) {
+ createConnection(name, 2);
+ jndiProps.put("connectionFactory." + name, "tcp://127.0.0.1:61616?type=TOPIC_CF");
+ }
+
+ @Override
+ public void deleteConnectionFactory(final String name) {
+ try {
+ invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name);
+ jndiProps.remove("connectionFactory." + name);
+ }
+ catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ @Override
+ public void deleteQueue(final String name) {
+ super.deleteQueue(name);
+ jndiProps.remove("queue." + name);
+ }
+
+ @Override
+ public void deleteQueueConnectionFactory(final String name) {
+ deleteConnectionFactory(name);
+ jndiProps.remove("connectionFactory." + name);
+ }
+
+ @Override
+ public void deleteTopic(final String name) {
+ super.deleteTopic(name);
+ jndiProps.remove("topic." + name);
+ }
+
+ @Override
+ public void deleteTopicConnectionFactory(final String name) {
+ deleteConnectionFactory(name);
+ jndiProps.remove("connectionFactory." + name);
+
+ }
+
+ @Override
+ public String getName() {
+ return this.getClass().getName();
+ }
+
+ // Inner classes -------------------------------------------------
+
+}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java
deleted file mode 100644
index 5892ee4..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.objectweb.jtests.jms.admin.Admin;
-
-/**
- * GenericAdmin.
- *
- * @FIXME delegate to a JBoss defined admin class
- */
-public class GenericAdmin implements Admin {
-
- public static final Logger log = Logger.getLogger(GenericAdmin.class);
-
- public static Admin delegate = new AbstractAdmin();
-
- @Override
- public String getName() {
- String name = GenericAdmin.delegate.getName();
- GenericAdmin.log.debug("Using admin '" + name + "' delegate=" + GenericAdmin.delegate);
- return name;
- }
-
- @Override
- public void start() throws Exception {
- }
-
- @Override
- public void stop() throws Exception {
- }
-
- @Override
- public Context createContext() throws NamingException {
- Context ctx = GenericAdmin.delegate.createContext();
- GenericAdmin.log.debug("Using initial context: " + ctx.getEnvironment());
- return ctx;
- }
-
- @Override
- public void createConnectionFactory(final String name) {
- GenericAdmin.log.debug("createConnectionFactory '" + name + "'");
- GenericAdmin.delegate.createConnectionFactory(name);
- }
-
- @Override
- public void deleteConnectionFactory(final String name) {
- GenericAdmin.log.debug("deleteConnectionFactory '" + name + "'");
- GenericAdmin.delegate.deleteConnectionFactory(name);
- }
-
- @Override
- public void createQueue(final String name) {
- GenericAdmin.log.debug("createQueue '" + name + "'");
- GenericAdmin.delegate.createQueue(name);
- }
-
- @Override
- public void deleteQueue(final String name) {
- GenericAdmin.log.debug("deleteQueue '" + name + "'");
- GenericAdmin.delegate.deleteQueue(name);
- }
-
- @Override
- public void createQueueConnectionFactory(final String name) {
- GenericAdmin.log.debug("createQueueConnectionFactory '" + name + "'");
- GenericAdmin.delegate.createQueueConnectionFactory(name);
- }
-
- @Override
- public void deleteQueueConnectionFactory(final String name) {
- GenericAdmin.log.debug("deleteQueueConnectionFactory '" + name + "'");
- GenericAdmin.delegate.deleteQueueConnectionFactory(name);
- }
-
- @Override
- public void createTopic(final String name) {
- GenericAdmin.log.debug("createTopic '" + name + "'");
- GenericAdmin.delegate.createTopic(name);
- }
-
- @Override
- public void deleteTopic(final String name) {
- GenericAdmin.log.debug("deleteTopic '" + name + "'");
- GenericAdmin.delegate.deleteTopic(name);
- }
-
- @Override
- public void createTopicConnectionFactory(final String name) {
- GenericAdmin.log.debug("createTopicConnectionFactory '" + name + "'");
- GenericAdmin.delegate.createTopicConnectionFactory(name);
- }
-
- @Override
- public void deleteTopicConnectionFactory(final String name) {
- GenericAdmin.log.debug("deleteTopicConnectionFactory '" + name + "'");
- GenericAdmin.delegate.deleteTopicConnectionFactory(name);
- }
-
- @Override
- public void startServer() throws Exception {
- GenericAdmin.log.debug("startEmbeddedServer");
- GenericAdmin.delegate.startServer();
- }
-
- @Override
- public void stopServer() throws Exception {
- GenericAdmin.log.debug("stopEmbeddedServer");
- GenericAdmin.delegate.stopServer();
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramAggregationTest.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramAggregationTest.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramAggregationTest.java
deleted file mode 100644
index c92e4f3..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramAggregationTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.objectweb.jtests.jms.admin.Admin;
-import org.objectweb.jtests.jms.admin.AdminFactory;
-import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
-import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
-import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
-import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
-import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
-import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
-import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
-import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
-import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
-import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
-import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
-import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
-import org.objectweb.jtests.jms.conform.selector.SelectorTest;
-import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
-import org.objectweb.jtests.jms.conform.session.SessionTest;
-import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
-import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
-import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
-import org.objectweb.jtests.jms.framework.JMSTestCase;
-
-@RunWith(Suite.class)
-@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class,})
-public class JoramAggregationTest extends Assert {
-
- /**
- * Should be overridden
- *
- * @return
- */
- protected static Properties getProviderProperties() throws IOException {
- Properties props = new Properties();
- props.load(ClassLoader.getSystemResourceAsStream(JMSTestCase.PROP_FILE_NAME));
- return props;
- }
-
- static Admin admin;
-
- @BeforeClass
- public static void setUpServer() throws Exception {
- JMSTestCase.startServer = false;
- // Admin step
- // gets the provider administration wrapper...
- Properties props = getProviderProperties();
- admin = AdminFactory.getAdmin(props);
- admin.startServer();
- }
-
- @AfterClass
- public static void tearDownServer() throws Exception {
- admin.stopServer();
- JMSTestCase.startServer = true;
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java
new file mode 100644
index 0000000..7448b9c
--- /dev/null
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.jms;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.objectweb.jtests.jms.admin.Admin;
+import org.objectweb.jtests.jms.admin.AdminFactory;
+import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
+import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
+import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
+import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
+import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
+import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
+import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
+import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
+import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorTest;
+import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
+import org.objectweb.jtests.jms.conform.session.SessionTest;
+import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
+import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
+import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
+import org.objectweb.jtests.jms.framework.JMSTestCase;
+
+@RunWith(Suite.class)
+@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class,})
+public class JoramCoreAggregationTest extends Assert {
+
+ /**
+ * Should be overridden
+ *
+ * @return
+ */
+ protected static Properties getProviderProperties() throws IOException {
+ Properties props = new Properties();
+ props.load(ClassLoader.getSystemResourceAsStream(JMSTestCase.getPropFileName()));
+ return props;
+ }
+
+ static Admin admin;
+
+ @BeforeClass
+ public static void setUpServer() throws Exception {
+ JMSTestCase.setPropFileName("provider.properties");
+ JMSTestCase.startServer = false;
+ // Admin step
+ // gets the provider administration wrapper...
+ Properties props = getProviderProperties();
+ admin = AdminFactory.getAdmin(props);
+ admin.startServer();
+ }
+
+ @AfterClass
+ public static void tearDownServer() throws Exception {
+ admin.stopServer();
+ JMSTestCase.startServer = true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/SpawnedJMSServer.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/SpawnedJMSServer.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/SpawnedJMSServer.java
deleted file mode 100644
index 205ac7f..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/SpawnedJMSServer.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import org.apache.activemq.artemis.api.core.TransportConfiguration;
-import org.apache.activemq.artemis.core.config.Configuration;
-import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
-import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
-import org.apache.activemq.artemis.core.server.ActiveMQServer;
-import org.apache.activemq.artemis.core.server.ActiveMQServers;
-import org.apache.activemq.artemis.jms.server.JMSServerManager;
-import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
-
-public class SpawnedJMSServer {
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- public static void main(final String[] args) throws Exception {
- try {
- Configuration config = new ConfigurationImpl().addAcceptorConfiguration(new TransportConfiguration(NettyAcceptorFactory.class.getName())).setSecurityEnabled(false).addConnectorConfiguration("netty", new TransportConfiguration(NettyConnectorFactory.class.getName()));
-
- // disable server persistence since JORAM tests do not restart server
- final ActiveMQServer server = ActiveMQServers.newActiveMQServer(config, false);
-
- JMSServerManager serverManager = new JMSServerManagerImpl(server);
- serverManager.start();
-
- System.out.println("Server started, ready to start client test");
-
- // create the reader before printing OK so that if the test is quick
- // we will still capture the STOP message sent by the client
- InputStreamReader isr = new InputStreamReader(System.in);
- BufferedReader br = new BufferedReader(isr);
-
- System.out.println("OK");
-
- String line = null;
- while ((line = br.readLine()) != null) {
- if ("STOP".equals(line.trim())) {
- server.stop();
- System.out.println("Server stopped");
- System.exit(0);
- }
- else {
- // stop anyway but with an error status
- System.exit(1);
- }
- }
- }
- catch (Throwable t) {
- t.printStackTrace();
- String allStack = t.getCause().getMessage() + "|";
- StackTraceElement[] stackTrace = t.getCause().getStackTrace();
- for (StackTraceElement stackTraceElement : stackTrace) {
- allStack += stackTraceElement.toString() + "|";
- }
- System.out.println(allStack);
- System.out.println("KO");
- System.exit(1);
- }
- }
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/JMSTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/JMSTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/JMSTestCase.java
index 9ef7a53..f51dea8 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/JMSTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/JMSTestCase.java
@@ -35,7 +35,16 @@ import org.objectweb.jtests.jms.admin.AdminFactory;
*/
public abstract class JMSTestCase extends Assert {
- public static final String PROP_FILE_NAME = "provider.properties";
+ public static String _PROP_FILE_NAME = "provider.properties";
+
+ public static String getPropFileName() {
+ return System.getProperty("joram.provider", _PROP_FILE_NAME);
+ }
+
+ public static void setPropFileName(String fileName) {
+ System.setProperty("joram.provider", fileName);
+ _PROP_FILE_NAME = fileName;
+ }
public static boolean startServer = true;
@@ -70,7 +79,7 @@ public abstract class JMSTestCase extends Assert {
*/
protected Properties getProviderProperties() throws IOException {
Properties props = new Properties();
- props.load(ClassLoader.getSystemResourceAsStream(JMSTestCase.PROP_FILE_NAME));
+ props.load(ClassLoader.getSystemResourceAsStream(getPropFileName()));
return props;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
index 833e475..0902a03 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
@@ -24,11 +24,7 @@ import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Hashtable;
-
-import org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -115,11 +111,7 @@ public abstract class PTPTestCase extends JMSTestCase {
admin.createQueueConnectionFactory(PTPTestCase.QCF_NAME);
admin.createQueue(PTPTestCase.QUEUE_NAME);
- Hashtable<String, String> props = new Hashtable<>();
- props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
- props.put("connectionFactory." + PTPTestCase.QCF_NAME, "tcp://127.0.0.1:61616?type=QUEUE_CF");
- props.put("queue." + PTPTestCase.QUEUE_NAME, PTPTestCase.QUEUE_NAME);
- Context ctx = new InitialContext(props);
+ Context ctx = admin.createContext();
senderQCF = (QueueConnectionFactory) ctx.lookup(PTPTestCase.QCF_NAME);
senderQueue = (Queue) ctx.lookup(PTPTestCase.QUEUE_NAME);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
index ab6c4d8..9974afb 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
@@ -24,11 +24,7 @@ import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Hashtable;
-
-import org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -115,11 +111,7 @@ public abstract class PubSubTestCase extends JMSTestCase {
admin.createTopicConnectionFactory(PubSubTestCase.TCF_NAME);
admin.createTopic(PubSubTestCase.TOPIC_NAME);
- Hashtable<String, String> props = new Hashtable<>();
- props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
- props.put("connectionFactory." + PubSubTestCase.TCF_NAME, "tcp://127.0.0.1:61616?type=TOPIC_CF");
- props.put("topic." + PubSubTestCase.TOPIC_NAME, PubSubTestCase.TOPIC_NAME);
- Context ctx = new InitialContext(props);
+ Context ctx = admin.createContext();
publisherTCF = (TopicConnectionFactory) ctx.lookup(PubSubTestCase.TCF_NAME);
publisherTopic = (Topic) ctx.lookup(PubSubTestCase.TOPIC_NAME);
@@ -140,6 +132,7 @@ public abstract class PubSubTestCase extends JMSTestCase {
// end of client step
}
catch (Exception e) {
+ e.printStackTrace();
throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
index 367cfec..bab66d8 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
@@ -27,11 +27,7 @@ import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnectionFactory;
import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Hashtable;
-
-import org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -165,15 +161,7 @@ public abstract class UnifiedTestCase extends JMSTestCase {
admin.createQueue(UnifiedTestCase.QUEUE_NAME);
admin.createTopic(UnifiedTestCase.TOPIC_NAME);
- Hashtable<String, String> props = new Hashtable<>();
- props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
- props.put("connectionFactory." + UnifiedTestCase.CF_NAME, "tcp://127.0.0.1:61616");
- props.put("connectionFactory." + UnifiedTestCase.QCF_NAME, "tcp://127.0.0.1:61616?type=QUEUE_CF");
- props.put("connectionFactory." + UnifiedTestCase.TCF_NAME, "tcp://127.0.0.1:61616?type=TOPIC_CF");
- props.put("queue." + UnifiedTestCase.DESTINATION_NAME, UnifiedTestCase.DESTINATION_NAME);
- props.put("queue." + UnifiedTestCase.QUEUE_NAME, UnifiedTestCase.QUEUE_NAME);
- props.put("topic." + UnifiedTestCase.TOPIC_NAME, UnifiedTestCase.TOPIC_NAME);
- Context ctx = new InitialContext(props);
+ Context ctx = admin.createContext();
producerCF = (ConnectionFactory) ctx.lookup(UnifiedTestCase.CF_NAME);
// we see destination of the unified domain as a javax.jms.Destination
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/resources/amqp_provider.properties
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/resources/amqp_provider.properties b/tests/joram-tests/src/test/resources/amqp_provider.properties
new file mode 100644
index 0000000..6a5bcfd
--- /dev/null
+++ b/tests/joram-tests/src/test/resources/amqp_provider.properties
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##
+# This property is used to chose which provider is to be tested
+# Uncomment the chosen provider and comment the other ones
+##
+
+jms.provider.admin.class=org.apache.activemq.artemis.amqpJMS.ActiveMQAMQPAdmin
+#jms.provider.admin.class = org.apache.activemq.artemis.api.jms.GenericAdmin
+#jms.provider.admin.class = org.objectweb.jtests.providers.admin.JoramAdmin
+#jms.provider.admin.class = org.objectweb.jtests.providers.admin.AshnaMQAdmin
+#jms.provider.admin.class = org.objectweb.jtests.providers.admin.FioranoMQAdmin
+#jms.provider.admin.class = org.objectweb.jtests.providers.admin.PramatiAdmin
+#jms.provider.admin.class = org.objectweb.jtests.providers.admin.SwiftMQAdmin
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/resources/provider.properties
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/resources/provider.properties b/tests/joram-tests/src/test/resources/provider.properties
index 0af3ee5..1307a79 100644
--- a/tests/joram-tests/src/test/resources/provider.properties
+++ b/tests/joram-tests/src/test/resources/provider.properties
@@ -19,7 +19,7 @@
# Uncomment the chosen provider and comment the other ones
##
-jms.provider.admin.class=org.apache.activemq.artemis.jms.ActiveMQAdmin
+jms.provider.admin.class=org.apache.activemq.artemis.jms.ActiveMQCoreAdmin
#jms.provider.admin.class = org.apache.activemq.artemis.api.jms.GenericAdmin
#jms.provider.admin.class = org.objectweb.jtests.providers.admin.JoramAdmin
#jms.provider.admin.class = org.objectweb.jtests.providers.admin.AshnaMQAdmin
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/joram-tests/src/test/resources/test.properties
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/resources/test.properties b/tests/joram-tests/src/test/resources/test.properties
index 2364dee..ed31436 100644
--- a/tests/joram-tests/src/test/resources/test.properties
+++ b/tests/joram-tests/src/test/resources/test.properties
@@ -18,4 +18,4 @@
# Time in milliseconds or 0 for never expiring
# Default is set to 30 seconds (long enough to receive slow messages
# and won't hang up tests infinitely)
-timeout = 30000
\ No newline at end of file
+timeout = 1000
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/10dfe97e/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/SelectorTranslatorTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/SelectorTranslatorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/SelectorTranslatorTest.java
index f2f89c8..d0ceea4 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/SelectorTranslatorTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/SelectorTranslatorTest.java
@@ -17,11 +17,11 @@
package org.apache.activemq.artemis.tests.unit.jms.client;
import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.utils.SelectorTranslator;
import org.junit.Test;
import org.junit.Assert;
-import org.apache.activemq.artemis.jms.client.SelectorTranslator;
public class SelectorTranslatorTest extends ActiveMQTestBase {