http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java ---------------------------------------------------------------------- diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java index db6ee37..1451366 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java @@ -28,6 +28,7 @@ public class SpringBindingRegistry implements BindingRegistry { this.factory = factory; } + @Override public Object lookup(String name) { Object obj = null; try { @@ -39,14 +40,17 @@ public class SpringBindingRegistry implements BindingRegistry { return obj; } + @Override public boolean bind(String name, Object obj) { factory.registerSingleton(name, obj); return true; } + @Override public void unbind(String name) { } + @Override public void close() { } }
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java ---------------------------------------------------------------------- diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java index 0288628..ff45181 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory; public class SpringJmsBootstrap extends EmbeddedJMS implements BeanFactoryAware { + @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { registry = new SpringBindingRegistry((ConfigurableBeanFactory) beanFactory); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java index 9bfd194..6ab5340 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java @@ -54,6 +54,7 @@ public class InVMNameParser implements NameParser, Serializable { return InVMNameParser.syntax; } + @Override public Name parse(final String name) throws NamingException { return new CompoundName(name, InVMNameParser.syntax); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java index 5579b1a..f77a413 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java @@ -65,10 +65,12 @@ public class InVMNamingContext implements Context, Serializable { // Context implementation ---------------------------------------- + @Override public Object lookup(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookup(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -93,26 +95,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void bind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void bind(final String name, final Object obj) throws NamingException { internalBind(name, obj, false); } + @Override public void rebind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rebind(final String name, final Object obj) throws NamingException { internalBind(name, obj, true); } + @Override public void unbind(final Name name) throws NamingException { unbind(name.toString()); } + @Override public void unbind(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -130,26 +138,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void rename(final Name oldName, final Name newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rename(final String oldName, final String newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration<NameClassPair> list(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration<NameClassPair> list(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration<Binding> listBindings(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration<Binding> listBindings(String contextName) throws NamingException { contextName = trimSlashes(contextName); if (!"".equals(contextName) && !".".equals(contextName)) { @@ -170,18 +184,22 @@ public class InVMNamingContext implements Context, Serializable { return new NamingEnumerationImpl<Binding>(l.iterator()); } + @Override public void destroySubcontext(final Name name) throws NamingException { destroySubcontext(name.toString()); } + @Override public void destroySubcontext(final String name) throws NamingException { map.remove(trimSlashes(name)); } + @Override public Context createSubcontext(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Context createSubcontext(String name) throws NamingException { name = trimSlashes(name); if (map.get(name) != null) { @@ -192,47 +210,58 @@ public class InVMNamingContext implements Context, Serializable { return c; } + @Override public Object lookupLink(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookupLink(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); } + @Override public NameParser getNameParser(final String name) throws NamingException { return parser; } + @Override public Name composeName(final Name name, final Name prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public String composeName(final String name, final String prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object addToEnvironment(final String propName, final Object propVal) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object removeFromEnvironment(final String propName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Hashtable<String, String> getEnvironment() throws NamingException { Hashtable<String, String> env = new Hashtable<String, String>(); env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory"); return env; } + @Override public void close() throws NamingException { } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } @@ -289,22 +318,27 @@ public class InVMNamingContext implements Context, Serializable { iterator = bindingIterator; } + @Override public void close() throws NamingException { throw new UnsupportedOperationException(); } + @Override public boolean hasMore() throws NamingException { return iterator.hasNext(); } + @Override public T next() throws NamingException { return iterator.next(); } + @Override public boolean hasMoreElements() { return iterator.hasNext(); } + @Override public T nextElement() { return iterator.next(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java index 4f4ddd1..171eb55 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java @@ -91,6 +91,7 @@ public class NonSerializableFactory implements ObjectFactory { return NonSerializableFactory.getWrapperMap().get(name); } + @Override public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java index fe90ac3..ab6ed50 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java @@ -53,6 +53,7 @@ public class PolicyMap extends DestinationMap { this.defaultEntry = defaultEntry; } + @Override protected Class<? extends DestinationMapEntry> getEntryClass() { return PolicyEntry.class; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java index 6279f33..73fbdcd 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java @@ -69,6 +69,7 @@ public class TcpTransportFactory extends TransportFactory { return super.doConnect(location); } + @Override public TransportServer doBind(final URI location) throws IOException { try { Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location)); @@ -93,6 +94,7 @@ public class TcpTransportFactory extends TransportFactory { return new TcpTransportServer(this, location, serverSocketFactory); } + @Override @SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { @@ -129,6 +131,7 @@ public class TcpTransportFactory extends TransportFactory { return true; } + @Override protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException { URI localLocation = null; String path = location.getPath(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java index 24213a1..2bd8382 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java @@ -52,10 +52,12 @@ public class ActiveMQMessageAuditTest extends TestCase { public static void main(String[] args) { } + @Override protected void setUp() throws Exception { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java index fa745ba..3ee3e85 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java @@ -582,14 +582,17 @@ public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport { final byte[] bs = baos.toByteArray(); return new Xid() { + @Override public int getFormatId() { return 86; } + @Override public byte[] getGlobalTransactionId() { return bs; } + @Override public byte[] getBranchQualifier() { return bs; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java index dd9e3e2..5e5b993 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java @@ -28,6 +28,7 @@ public class ConnectionCleanupTest extends TestCase { private ActiveMQConnection connection; + @Override protected void setUp() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); connection = (ActiveMQConnection) factory.createConnection(); @@ -36,6 +37,7 @@ public class ConnectionCleanupTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { connection.close(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java index a53b143..c4e5086 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java @@ -34,6 +34,7 @@ public class ConnectionCloseMultipleTimesConcurrentTest extends TestCase { private ExecutorService executor; private int size = 200; + @Override protected void setUp() throws Exception { executor = Executors.newFixedThreadPool(20); @@ -45,6 +46,7 @@ public class ConnectionCloseMultipleTimesConcurrentTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection.isStarted()) { connection.stop(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java index c33e0f3..dbd31f2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java @@ -28,6 +28,7 @@ public class ConnectionCloseMultipleTimesTest extends TestCase { private ActiveMQConnection connection; + @Override protected void setUp() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); connection = (ActiveMQConnection) factory.createConnection(); @@ -37,6 +38,7 @@ public class ConnectionCloseMultipleTimesTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection.isStarted()) { connection.stop(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java index 89f6c81..03ed8df 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java @@ -31,6 +31,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -61,6 +63,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { final Queue queue = session.createQueue("test"); Thread t = new Thread() { + @Override public void run() { try { // wait for 10 seconds to allow consumer.receive to be run http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java index 6ae8a2d..fa58ebe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java @@ -39,6 +39,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport { protected ActiveMQDestination destination; protected JmsTemplate template; + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -55,6 +56,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport { template.afterPropertiesSet(); } + @Override protected void tearDown() throws Exception { if (broker != null) { try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java index 69d8c2d..c3aac48 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java @@ -49,6 +49,7 @@ public class ExpiryHogTest extends JmsMultipleClientsTestSupport { allMessagesList.assertMessagesReceived(numMessages); } + @Override protected BrokerService createBroker() throws Exception { BrokerService bs = new BrokerService(); bs.setDeleteAllMessagesOnStartup(true); @@ -62,6 +63,7 @@ public class ExpiryHogTest extends JmsMultipleClientsTestSupport { return bs; } + @Override protected TextMessage createTextMessage(Session session, String initText) throws Exception { if (sleep) { TimeUnit.SECONDS.sleep(10); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java index cc22f6c..c2f48f2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java @@ -30,6 +30,7 @@ public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest { private static final Logger LOG = LoggerFactory.getLogger(JMSDurableTopicRedeliverTest.class); + @Override protected void setUp() throws Exception { durable = true; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java index 543c678..f924621 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java @@ -21,6 +21,7 @@ package org.apache.activemq; */ public class JMSQueueRedeliverTest extends JmsTopicRedeliverTest { + @Override protected void setUp() throws Exception { topic = false; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java index fcebb64..fa6877d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java @@ -37,15 +37,19 @@ public class JMSXAConsumerTest extends JMSConsumerTest { // some tests use transactions, these will not work unless an XA transaction is in place // slip these + @Override public void testPrefetch1MessageNotDispatched() throws Exception { } + @Override public void testRedispatchOfUncommittedTx() throws Exception { } + @Override public void testRedispatchOfRolledbackTx() throws Exception { } + @Override public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception { } } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java index 6da44ef..5900560 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java @@ -31,6 +31,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -73,6 +75,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen session.close(); } + @Override public void onMessage(Message message) { assertNotNull(message); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java index 0bca656..39e73fe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java @@ -31,6 +31,7 @@ public class JmsAutoAckTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsAutoAckTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java index fe96ecf..9142cf8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java @@ -32,6 +32,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList private Connection connection; private boolean dontAck; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -40,6 +41,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -114,6 +116,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList session.close(); } + @Override public void onMessage(Message message) { assertNotNull(message); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java index 0e54ef2..4a86d9c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java @@ -31,6 +31,7 @@ public class JmsClientAckTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsClientAckTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java index 7900b6f..1a80ac9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java @@ -39,11 +39,13 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { private Connection connection; private ActiveMQConnectionFactory factory; + @Override protected void setUp() throws Exception { factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); connection = factory.createConnection(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -66,6 +68,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { final Vector<Object> results = new Vector<Object>(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { @@ -116,6 +119,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { final Vector<Object> results = new Vector<Object>(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java index b1b3955..f487937 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java @@ -41,6 +41,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); super.topic = true; @@ -58,6 +59,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes /* * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); connection.close(); @@ -84,6 +86,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes * * @param message */ + @Override public void onMessage(Message message) { try { testConsumer = consumerSession.createConsumer(topic); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java index 9b336cd..bf1535a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java @@ -30,6 +30,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.PERSISTENT; @@ -39,6 +40,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the consumer subject. */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -46,6 +48,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the producer subject. */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java index 3c1b043..7db52ae 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java @@ -21,6 +21,7 @@ package org.apache.activemq; */ public class JmsDurableTopicSelectorTest extends JmsTopicSelectorTest { + @Override public void setUp() throws Exception { durable = true; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java index 494fb7b..978f31c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java @@ -49,6 +49,7 @@ public class JmsDurableTopicSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { this.durable = true; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java index b9fe5ef..d827778 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java @@ -28,6 +28,7 @@ public class JmsDurableTopicTransactionTest extends JmsTopicTransactionTest { /** * @see JmsTransactionTestSupport#getJmsResourceProvider() */ + @Override protected JmsResourceProvider getJmsResourceProvider() { JmsResourceProvider provider = new JmsResourceProvider(); provider.setTopic(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java index 4e0a2dc..b913726 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java @@ -31,6 +31,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = true; durable = true; @@ -41,6 +42,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the consumer subject. */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -48,6 +50,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the producer subject. */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java index 5f87199..6e2d284 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java @@ -196,6 +196,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { boolean result = false; if (!broker.getNetworkConnectors().isEmpty()) { result = Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int activeCount = 0; for (NetworkBridge bridge : broker.getNetworkConnectors().get(bridgeIndex).activeBridges()) { @@ -240,6 +241,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { long time, TimeUnit units) throws InterruptedException, TimeoutException, Exception { if (!Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() { return hasBridge(localBrokerName, remoteBrokerName); } @@ -416,6 +418,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { final AtomicInteger actualConnected = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(1); ces.setConsumerListener(new ConsumerListener() { + @Override public void onConsumerEvent(ConsumerEvent event) { if (actualConnected.get() < count) { actualConnected.set(event.getConsumerCount()); @@ -508,12 +511,14 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { } } + @Override protected void setUp() throws Exception { super.setUp(); brokers = new HashMap<String, BrokerItem>(); destinations = new HashMap<String, Destination>(); } + @Override protected void tearDown() throws Exception { destroyAllBrokers(); super.tearDown(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java index 38dbcd1..233e9e0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java @@ -94,6 +94,7 @@ public class JmsMultipleClientsTestSupport { for (int i = 0; i < producerCount; i++) { Thread t = new Thread(new Runnable() { + @Override public void run() { try { sendMessages(factory.createConnection(), dest, msgCount); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java index 79485cd..1910321 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java @@ -42,6 +42,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.NON_PERSISTENT; @@ -54,6 +55,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -64,6 +66,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2"; } @@ -73,6 +76,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java index ed84731..839a9b4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java @@ -26,6 +26,7 @@ public class JmsQueueRequestReplyTest extends JmsTopicRequestReplyTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java index 93169f5..ff2d521 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java @@ -22,6 +22,7 @@ package org.apache.activemq; */ public class JmsQueueSelectorTest extends JmsTopicSelectorTest { + @Override public void setUp() throws Exception { topic = false; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java index 3a8c23c..f007190 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java @@ -28,6 +28,7 @@ public class JmsQueueSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java index b717607..412577e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java @@ -57,14 +57,17 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ } } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)?maxReconnectAttempts=10&useExponentialBackOff=false&initialReconnectDelay=200"); } + @Override protected void setUp() throws Exception { setAutoFail(true); // now lets asynchronously start a broker Thread thread = new Thread() { + @Override public void run() { startBroker(); } @@ -74,6 +77,7 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java index de1c17a..e5f0738 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java @@ -26,6 +26,7 @@ public class JmsQueueSendReceiveUsingTwoSessionsTest extends JmsQueueSendReceive * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { useSeparateSession = true; super.setUp(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java index fe1d533..28173b8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java @@ -37,6 +37,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { deliveryMode = DeliveryMode.NON_PERSISTENT; topic = false; @@ -59,6 +60,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -69,6 +71,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "queue://FOO.BAR.HUMBUG,topic://FOO.BAR.HUMBUG2"; } @@ -78,6 +81,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java index 96ae1c7..296a56e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java @@ -43,6 +43,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.NON_PERSISTENT; @@ -55,6 +56,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -65,6 +67,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java index a6a4f23..6b985eb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java @@ -49,6 +49,7 @@ public class JmsRedeliveredTest extends TestCase { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { connection = createConnection(); } @@ -56,6 +57,7 @@ public class JmsRedeliveredTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -533,6 +535,7 @@ public class JmsRedeliveredTest extends TestCase { * * @return int - persistent delivery mode. */ + @Override protected int getDeliveryMode() { return DeliveryMode.PERSISTENT; } @@ -548,6 +551,7 @@ public class JmsRedeliveredTest extends TestCase { * * @return int - non-persistent delivery mode. */ + @Override protected int getDeliveryMode() { return DeliveryMode.NON_PERSISTENT; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java index b3c2d37..6fd36cc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java @@ -60,6 +60,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); String temp = System.getProperty("messageCount"); @@ -195,6 +196,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis * * @see javax.jms.MessageListener#onMessage(javax.jms.Message) */ + @Override public synchronized void onMessage(Message message) { consumeMessage(message, messages); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java index f7889dc..19290c0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java @@ -56,6 +56,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -299,6 +300,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport { return session.createConsumer(consumerDestination); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); LOG.info("Closing down connection"); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java index f073724..e083332 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java @@ -47,6 +47,7 @@ public class JmsSessionRecoverTest extends TestCase { /** * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); connection = factory.createConnection(); @@ -55,6 +56,7 @@ public class JmsSessionRecoverTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -171,6 +173,7 @@ public class JmsSessionRecoverTest extends TestCase { consumer.setMessageListener(new MessageListener() { int counter; + @Override public void onMessage(Message msg) { counter++; try { @@ -242,6 +245,7 @@ public class JmsSessionRecoverTest extends TestCase { consumer.setMessageListener(new MessageListener() { int counter; + @Override public void onMessage(Message msg) { counter++; try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java index 3fc6add..03bf32c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java @@ -112,6 +112,7 @@ public class JmsTestSupport extends CombinationTestSupport { return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false")); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -127,6 +128,7 @@ public class JmsTestSupport extends CombinationTestSupport { connections.add(connection); } + @Override protected void tearDown() throws Exception { for (Iterator<Connection> iter = connections.iterator(); iter.hasNext(); ) { Connection conn = iter.next(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java index 4536d3b..eb9a06d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java @@ -38,6 +38,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { deliveryMode = DeliveryMode.NON_PERSISTENT; super.setUp(); @@ -59,6 +60,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -69,6 +71,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2"; } @@ -78,6 +81,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java index 2842e0b..3bb2df9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java @@ -48,6 +48,7 @@ public class JmsTopicRedeliverTest extends TestSupport { protected boolean verbose; protected long initRedeliveryDelay; + @Override protected void setUp() throws Exception { super.setUp(); @@ -88,6 +89,7 @@ public class JmsTopicRedeliverTest extends TestSupport { LOG.info("Created connection: " + connection); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -101,6 +103,7 @@ public class JmsTopicRedeliverTest extends TestSupport { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "TEST"; } @@ -111,6 +114,7 @@ public class JmsTopicRedeliverTest extends TestSupport { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "TEST"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java index 02848bf..ce73a83 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java @@ -109,6 +109,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList /** * Use the asynchronous subscription mechanism */ + @Override public void onMessage(Message message) { try { TextMessage requestMessage = (TextMessage) message; @@ -163,6 +164,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList } } + @Override protected void setUp() throws Exception { super.setUp(); @@ -181,6 +183,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList } else { Thread thread = new Thread(new Runnable() { + @Override public void run() { syncConsumeLoop(requestConsumer); } @@ -190,6 +193,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList serverConnection.start(); } + @Override protected void tearDown() throws Exception { super.tearDown(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java index ece92cb..8968d31 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java @@ -48,6 +48,7 @@ public class JmsTopicSelectorTest extends TestSupport { protected boolean durable; protected int deliveryMode = DeliveryMode.PERSISTENT; + @Override public void setUp() throws Exception { super.setUp(); @@ -81,6 +82,7 @@ public class JmsTopicSelectorTest extends TestSupport { connection.start(); } + @Override public void tearDown() throws Exception { session.close(); connection.close(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java index 514b70e..3f120a6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java @@ -26,6 +26,7 @@ import javax.jms.TopicSession; */ public class JmsTopicSendReceiveSubscriberTest extends JmsTopicSendReceiveTest { + @Override protected MessageConsumer createConsumer() throws JMSException { if (durable) { return super.createConsumer(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java index a801911..71ddcd5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java @@ -35,6 +35,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -80,6 +81,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { return session.createConsumer(consumerDestination); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); // connectionFactory.getStats().reset(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java index be9abb1..b5dcacc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java @@ -34,6 +34,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes protected Connection receiveConnection; protected Session receiveSession; + @Override protected void setUp() throws Exception { super.setUp(); @@ -97,10 +98,12 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes return session.createConsumer(dest); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); } + @Override protected void tearDown() throws Exception { session.close(); receiveSession.close(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java index 508740f..5acaece 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java @@ -22,6 +22,7 @@ package org.apache.activemq; */ public class JmsTopicSendReceiveWithTwoConnectionsWithJMXTest extends JmsTopicSendReceiveWithTwoConnectionsTest { + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=true"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java index 02c408a..7b84a15 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java @@ -25,6 +25,7 @@ public class JmsTopicSendSameMessageTest extends JmsTopicSendReceiveWithTwoConne private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(JmsTopicSendSameMessageTest.class); + @Override public void testSendReceive() throws Exception { messages.clear(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java index 2beb0a0..b9ec483 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java @@ -26,6 +26,7 @@ public class JmsTopicTransactionTest extends JmsTransactionTestSupport { /** * @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider() */ + @Override protected JmsResourceProvider getJmsResourceProvider() { JmsResourceProvider p = new JmsResourceProvider(); p.setTopic(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java index 6917771..8fd1c00 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java @@ -38,6 +38,7 @@ public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { private String destination3String = "TEST.ONE.TWO"; private String destination4String = "TEST.TWO.ONE"; + @Override protected void setUp() throws Exception { topic = true; durable = false; @@ -45,10 +46,12 @@ public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { super.setUp(); } + @Override protected String getConsumerSubject() { return "FOO.>"; } + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java index 55cb997..889ec76 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java @@ -84,6 +84,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag } } + @Override public void setUp() throws Exception { super.setUp(); ClientTestSupport.removeMessageStore(); @@ -135,6 +136,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag activeMQConnection.getPrefetchPolicy().setOptimizeDurableTopicPrefetch(prefetchValue); } + @Override public void tearDown() throws Exception { Thread.sleep(1000); producerConnection.close(); @@ -159,6 +161,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag return result; } + @Override public void onMessage(Message msg) { try { BytesMessage ba = (BytesMessage) msg; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java index e243a6a..94bd3d5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java @@ -62,11 +62,13 @@ public class LoadTestBurnIn extends JmsTestSupport { return suite(LoadTestBurnIn.class); } + @Override protected void setUp() throws Exception { LOG.info("Start: " + getName()); super.setUp(); } + @Override protected void tearDown() throws Exception { try { super.tearDown(); @@ -83,12 +85,14 @@ public class LoadTestBurnIn extends JmsTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected BrokerService createBroker() throws Exception { return BrokerFactory.createBroker(new URI("broker://(tcp://localhost:0)?useJmx=true")); // return BrokerFactory.createBroker(new // URI("xbean:org/apache/activemq/broker/store/loadtester.xml")); } + @Override protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException { return new ActiveMQConnectionFactory(((TransportConnector) broker.getTransportConnectors().get(0)).getServer().getConnectURI()); } @@ -126,6 +130,7 @@ public class LoadTestBurnIn extends JmsTestSupport { // Send the messages, async new Thread() { + @Override public void run() { Connection connection2 = null; try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java index 2d8e2f2..25a8fad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java @@ -48,12 +48,14 @@ public class MessageTransformationTest extends TestCase { * * @throws Exception */ + @Override protected void setUp() throws Exception { } /** * Clears up the resources used in the unit test. */ + @Override protected void tearDown() throws Exception { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java index 92635fa..0246253 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java @@ -93,6 +93,7 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { return new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString()); } + @Override @Before public void setUp() throws Exception { setAutoFail(true); @@ -106,6 +107,7 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { connection.start(); } + @Override @After public void tearDown() throws Exception { connectionConsumer.close(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java index 557b5ce..f55dee2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java @@ -160,6 +160,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { } } + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setDeleteAllMessagesOnStartup(true); @@ -180,11 +181,13 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { return service; } + @Override public void setUp() throws Exception { setAutoFail(true); super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { TcpTransport t = (TcpTransport) connection.getTransport().narrow(TcpTransport.class); @@ -194,6 +197,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { } } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(connector.getConnectUri()); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java index 535f991..4a4a07c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java @@ -36,6 +36,7 @@ import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStorag public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setPersistent(false); @@ -167,6 +168,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest { protected ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(connector.getConnectUri()); connectionFactory.setExceptionListener(new ExceptionListener() { + @Override public void onException(JMSException arg0) { if (arg0 instanceof ResourceAllocationException) { gotResourceException.set(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java index 0ab2c03..ea4bc16 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java @@ -259,6 +259,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { // Once the send starts to block it will not reset the done flag // anymore. new Thread("Fill thread.") { + @Override public void run() { Session session = null; try { @@ -296,6 +297,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { private CountDownLatch asyncSendTo(final ActiveMQQueue queue, final String message) throws JMSException { final CountDownLatch done = new CountDownLatch(1); new Thread("Send thread.") { + @Override public void run() { Session session = null; try { @@ -315,6 +317,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { return done; } + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setPersistent(false); @@ -334,11 +337,13 @@ public class ProducerFlowControlTest extends JmsTestSupport { return service; } + @Override public void setUp() throws Exception { setAutoFail(true); super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { TcpTransport t = (TcpTransport) connection.getTransport().narrow(TcpTransport.class); @@ -348,6 +353,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { super.tearDown(); } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(connector.getConnectUri()); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java index e118200..c6f60f8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java @@ -99,11 +99,13 @@ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport { return new ActiveMQConnectionFactory((useFailover ? "failover:" : "") + broker.getTransportConnectors().get(0).getPublishableConnectString()); } + @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:0"; super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close();