http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java index 2464b6b..fe1a455 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java @@ -1 +1 @@ -/** * * 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.openwire.v9;
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.ac tivemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file +/** * * 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.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.ac tivemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java index e049233..efc5500 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java @@ -28,6 +28,7 @@ public class KahaQueueTest extends SimpleQueueTest { final static String config = "org/apache/activemq/perf/kahadbBroker.xml"; + @Override protected BrokerService createBroker(String uri) throws Exception { Resource resource = new ClassPathResource(config); BrokerFactoryBean brokerFactory = new BrokerFactoryBean(resource); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java index 157859f..4137cf9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java @@ -26,6 +26,7 @@ import org.apache.activemq.leveldb.LevelDBStore; */ public class LevelDBStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amq"); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java index c8e8c8e..edbe4ef 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java @@ -81,6 +81,7 @@ public class PerfConsumer implements MessageListener { return rate; } + @Override public void onMessage(Message msg) { if (firstMessage) { firstMessage = false; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java index 2d9cedd..dee2f83 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java @@ -101,6 +101,7 @@ public class PerfProducer implements Runnable { return running; } + @Override public void run() { try { while (isRunning()) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java index f8da821..f870d20 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java @@ -23,6 +23,7 @@ import javax.jms.JMSException; public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { + @Override protected void setUp() throws Exception { numberofProducers = 1; numberOfConsumers = 1; @@ -31,6 +32,7 @@ public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { super.setUp(); } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -40,6 +42,7 @@ public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { return pp; } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { return new PerfConsumer(fac, dest, "subs:" + number); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java index e4ee0ed..531a938 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java @@ -39,6 +39,7 @@ public class SimpleNetworkTest extends SimpleTopicTest { protected ActiveMQConnectionFactory consumerFactory; protected ActiveMQConnectionFactory producerFactory; + @Override protected void setUp() throws Exception { if (consumerBroker == null) { consumerBroker = createConsumerBroker(consumerBindAddress); @@ -78,6 +79,7 @@ public class SimpleNetworkTest extends SimpleTopicTest { con.close(); } + @Override protected void tearDown() throws Exception { for (int i = 0; i < numberOfConsumers; i++) { consumers[i].shutDown(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java index aa956a3..a240448 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java @@ -32,11 +32,13 @@ import org.apache.activemq.broker.region.policy.PolicyMap; public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { + @Override protected void setUp() throws Exception { numberOfDestinations = 20; super.setUp(); } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -48,6 +50,7 @@ public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { return pp; } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { PerfConsumer consumer = new PerfConsumer(fac, dest); boolean enableAudit = numberOfConsumers <= 1; @@ -56,15 +59,18 @@ public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { return consumer; } + @Override public void testPerformance() throws JMSException, InterruptedException { //Thread.sleep(5000); super.testPerformance(); } + @Override protected Destination createDestination(Session s, String destinationName) throws JMSException { return s.createQueue(destinationName); } + @Override protected void configureBroker(BrokerService answer) throws Exception { answer.setPersistent(false); answer.setMonitorConnectionSplits(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java index 9c033fe..e1ac924 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java @@ -26,6 +26,7 @@ import javax.jms.JMSException; */ public class SimpleNonPersistentTopicTest extends SimpleTopicTest { + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java index ab82167..24eaad2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java @@ -39,6 +39,7 @@ public class SlowConsumer extends PerfConsumer { super(fac, dest, null); } + @Override public void onMessage(Message msg) { super.onMessage(msg); LOG.debug("GOT A MSG " + msg); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java index 645e8ce..8a4dd22 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java @@ -35,17 +35,20 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { protected PerfConsumer[] slowConsumers; + @Override protected void setUp() throws Exception { playloadSize = 10 * 1024; super.setUp(); } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { PerfConsumer result = new SlowConsumer(fac, dest); return result; } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -56,6 +59,7 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { return result; } + @Override protected BrokerService createBroker(String url) throws Exception { Resource resource = new ClassPathResource("org/apache/activemq/perf/slowConsumerBroker.xml"); System.err.println("CREATE BROKER FROM " + resource); @@ -67,6 +71,7 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { return broker; } + @Override protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception { ActiveMQConnectionFactory result = super.createConnectionFactory(uri); ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java index 98464ca..c7d307b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java @@ -29,6 +29,7 @@ public class TemporaryTopicMemoryAllocationTest extends MemoryAllocationTest { super(); } + @Override protected Destination getDestination(Session session) throws JMSException { return session.createTemporaryTopic(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java index dc0a3a6..6d229c3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java @@ -32,15 +32,18 @@ public class JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest extends JmsTopi protected static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.class); protected PooledConnectionFactory senderConnectionFactory = new PooledConnectionFactory("vm://localhost?broker.persistent=false"); + @Override protected Connection createSendConnection() throws Exception { return senderConnectionFactory.createConnection(); } + @Override protected void setUp() throws Exception { verbose = true; super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); senderConnectionFactory.stop(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java index acb7ee4..74c971a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java @@ -42,6 +42,7 @@ public class ProxyConnectorTest extends ProxyTestSupport { junit.textui.TestRunner.run(suite()); } + @Override public void setUp() throws Exception { super.setAutoFail(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/proxy/ProxyTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java index 7f0af12..97c66b6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java @@ -42,6 +42,7 @@ public class ProxyTestSupport extends BrokerTestSupport { private ProxyConnector proxyConnector; private ProxyConnector remoteProxyConnector; + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setBrokerName("broker1"); @@ -74,12 +75,14 @@ public class ProxyTestSupport extends BrokerTestSupport { return service; } + @Override protected void setUp() throws Exception { super.setUp(); remoteBroker = createRemoteBroker(); remoteBroker.start(); } + @Override protected void tearDown() throws Exception { for (Iterator<StubConnection> iter = connections.iterator(); iter.hasNext(); ) { StubConnection connection = iter.next(); @@ -106,6 +109,7 @@ public class ProxyTestSupport extends BrokerTestSupport { return "tcp://localhost:6172"; } + @Override protected StubConnection createConnection() throws Exception { Transport transport = TransportFactory.connect(connector.getServer().getConnectURI()); StubConnection connection = new StubConnection(transport); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java index a3086a5..353a140 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java @@ -30,6 +30,7 @@ public abstract class AbstractCachedLDAPAuthorizationModuleTest extends Abstract static final UserPrincipal JDOE = new UserPrincipal("jdoe"); + @Override @Test public void testQuery() throws Exception { map.query(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java index d3a46e8..1fc0723 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java @@ -57,11 +57,13 @@ public class CachedLDAPAuthorizationModuleLegacyOpenLDAPTest extends AbstractCac cleanAndLoad("dc=apache,dc=org", "org/apache/activemq/security/activemq-openldap-legacy.ldif", LDAP_HOST, LDAP_PORT, LDAP_USER, LDAP_PASS, map.open()); } + @Override @Test public void testRenameDestination() throws Exception { // Subtree rename not implemented by OpenLDAP. } + @Override protected SimpleCachedLDAPAuthorizationMap createMap() { SimpleCachedLDAPAuthorizationMap newMap = super.createMap(); newMap.setConnectionURL("ldap://" + LDAP_HOST + ":" + String.valueOf(LDAP_PORT)); @@ -75,18 +77,22 @@ public class CachedLDAPAuthorizationModuleLegacyOpenLDAPTest extends AbstractCac return newMap; } + @Override protected InputStream getAddLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-openldap-legacy-add.ldif"); } + @Override protected InputStream getRemoveLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-openldap-legacy-delete.ldif"); } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,dc=activemq,dc=apache,dc=org"; } + @Override protected LdapConnection getLdapConnection() throws LdapException, IOException { LdapConnection connection = new LdapNetworkConnection(LDAP_HOST, LDAP_PORT); connection.bind(new Dn(LDAP_USER), LDAP_PASS); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java index cd2e8f6..91dff53 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java @@ -42,18 +42,22 @@ public class CachedLDAPAuthorizationModuleLegacyTest extends AbstractCachedLDAPA return map; } + @Override protected InputStream getAddLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-apacheds-legacy-add.ldif"); } + @Override protected InputStream getRemoveLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-apacheds-legacy-delete.ldif"); } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"; } + @Override protected LdapConnection getLdapConnection() throws LdapException, IOException { LdapConnection connection = new LdapNetworkConnection("localhost", getLdapServer().getPort()); connection.bind(new Dn("uid=admin,ou=system"), "secret"); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java index 2394d61..c819029 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java @@ -57,6 +57,7 @@ public class CachedLDAPAuthorizationModuleOpenLDAPTest extends AbstractCachedLDA cleanAndLoad("dc=apache,dc=org", "org/apache/activemq/security/activemq-openldap.ldif", LDAP_HOST, LDAP_PORT, LDAP_USER, LDAP_PASS, map.open()); } + @Override @Test public void testRenameDestination() throws Exception { // Subtree rename not implemented by OpenLDAP. http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java index f1e43b1..523f902 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java @@ -55,6 +55,7 @@ public class CachedLDAPAuthorizationModuleTest extends AbstractCachedLDAPAuthori return "cn=users,ou=Group,ou=ActiveMQ,ou=system"; } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java index 135f3df..90fc4fa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java @@ -55,6 +55,7 @@ public class DoSTest extends JmsTestSupport { Thread thread = new Thread() { Connection connection = null; + @Override public void run() { for (int i = 0; i < 1000 && !done.get(); i++) { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); @@ -90,6 +91,7 @@ public class DoSTest extends JmsTestSupport { done.set(true); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/dos-broker.xml"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java index 67f428d..dd2eec3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java @@ -36,6 +36,7 @@ public class JaasNetworkTest extends TestCase { BrokerService broker1; BrokerService broker2; + @Override public void setUp() throws Exception { System.setProperty("java.security.auth.login.config", "src/test/resources/login.config"); broker1 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/security/broker1.xml")); @@ -45,6 +46,7 @@ public class JaasNetworkTest extends TestCase { Thread.sleep(2000); } + @Override protected void tearDown() throws Exception { super.tearDown(); broker1.stop(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java index 6819323..6afe0aa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java @@ -41,6 +41,7 @@ public class SecurityTestSupport extends JmsTestSupport { /** * Overrides to set the JMSXUserID flag to true. */ + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPopulateJMSXUserID(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java index 298598b..cfbada4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java @@ -41,6 +41,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestUserReceiveFails() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -50,6 +51,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestInvalidAuthentication() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -58,6 +60,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestUserReceiveSucceeds() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -67,6 +70,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestGuestReceiveSucceeds() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -76,6 +80,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestReceiveFails() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -85,6 +90,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestUserSendSucceeds() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -94,6 +100,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestUserSendFails() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -103,6 +110,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestSendFails() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -112,6 +120,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestSendSucceeds() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java index d6ad38b..5a7da39 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.security; */ public class SimpleAuthorizationMapTest extends AuthorizationMapTest { + @Override protected AuthorizationMap createAuthorizationMap() { return SimpleSecurityBrokerSystemTest.createAuthorizationMap(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java index ae647fe..7036dd0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java @@ -148,6 +148,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { public static class SimpleAuthenticationFactory implements BrokerPlugin { + @Override public Broker installPlugin(Broker broker) { HashMap<String, String> u = new HashMap<String, String>(); @@ -163,6 +164,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { return new SimpleAuthenticationBroker(broker, u, groups); } + @Override public String toString() { return "SimpleAuthenticationBroker"; } @@ -176,6 +178,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { addCombinationValues("authenticationPlugin", new Object[]{new SimpleAuthenticationFactory(), new JaasAuthenticationPlugin()}); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPopulateJMSXUserID(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java index 03f38d9..bb56430 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java @@ -25,6 +25,7 @@ import javax.security.auth.callback.UnsupportedCallbackException; public class StubDoNothingCallbackHandler implements CallbackHandler { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java index dbb788a..b91f019 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java @@ -30,6 +30,7 @@ public class StubDualJaasConfiguration extends Configuration { this.sslConfigEntry = sslConfigEntry; } + @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { if ("activemq-domain".equals(name)) { return new AppConfigurationEntry[]{nonSslConfigEntry}; @@ -39,6 +40,7 @@ public class StubDualJaasConfiguration extends Configuration { } } + @Override public void refresh() { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java index fe5ce1a..a30216e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java @@ -28,10 +28,12 @@ public class StubJaasConfiguration extends Configuration { this.configEntry = configEntry; } + @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { return new AppConfigurationEntry[]{configEntry}; } + @Override public void refresh() { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java index 38a0f5a..8bcead7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java @@ -26,6 +26,7 @@ public class StubSecurityContext extends SecurityContext { super(""); } + @Override public Set<Principal> getPrincipals() { return null; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java index d98e70c..81c360d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java @@ -41,6 +41,7 @@ public class XBeanSecurityTest extends SecurityTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker.xml"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java index 7c3fef8..e7fe664 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java @@ -70,6 +70,7 @@ public class XBeanSecurityWithGuestNoCredentialsOnlyTest extends JmsTestSupport assertEquals("guest", m.getStringProperty("JMSXUserID")); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java index 11a6f34..004a5d1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java @@ -67,6 +67,7 @@ public class XBeanSecurityWithGuestTest extends JmsTestSupport { assertEquals("guest", m.getStringProperty("JMSXUserID")); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker-guest.xml"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java index dc676ae..c96515c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java @@ -78,6 +78,7 @@ public class SpringConsumer extends ConsumerBean implements MessageListener { } } + @Override public void onMessage(Message message) { super.onMessage(message); try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java index c791480..7049c23 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java @@ -38,6 +38,7 @@ public class SpringProducer { for (int i = 0; i < messageCount; i++) { final String text = "Text for message: " + i; template.send(destination, new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { LOG.info("Sending message: " + text); TextMessage message = session.createTextMessage(text); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java index 8c1f386..da18beb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java @@ -24,6 +24,7 @@ import org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter; public class AutoStorePerDestinationTest extends StorePerDestinationTest { // use perDestinationFlag to get multiple stores from one match all adapter + @Override public void prepareBrokerWithMultiStore(boolean deleteAllMessages) throws Exception { MultiKahaDBPersistenceAdapter multiKahaDBPersistenceAdapter = new MultiKahaDBPersistenceAdapter(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java index 0b3f674..f7ab98d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java @@ -75,6 +75,7 @@ public abstract class StoreOrderTest { producer = session.createProducer(destination); } + @Override public void run() { try { if (!first) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java index e21b545..5066100 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java @@ -124,6 +124,7 @@ public class JDBCIOExceptionHandlerTest extends TestCase { final AtomicReference<BrokerService> slave = new AtomicReference<BrokerService>(); Thread slaveThread = new Thread() { + @Override public void run() { try { BrokerService broker = new BrokerService(); @@ -321,6 +322,7 @@ public class JDBCIOExceptionHandlerTest extends TestCase { } } + @Override public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java index b3fe798..e41cf13 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java @@ -31,6 +31,7 @@ public class JDBCNegativeQueueTest extends NegativeQueueTest { EmbeddedDataSource dataSource; + @Override protected void configureBroker(BrokerService answer) throws Exception { super.configureBroker(answer); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); @@ -41,6 +42,7 @@ public class JDBCNegativeQueueTest extends NegativeQueueTest { answer.setPersistenceAdapter(jdbc); } + @Override protected void tearDown() throws Exception { if (DEBUG) { printQuery("Select * from ACTIVEMQ_MSGS", System.out); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java index 71ffb1b..8e0c387 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java @@ -22,6 +22,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCNetworkBrokerDetachTest extends NetworkBrokerDetachTest { + @Override protected void configureBroker(BrokerService broker) throws Exception { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); EmbeddedDataSource dataSource = new EmbeddedDataSource(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java index b3e2991..59c447b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java @@ -26,6 +26,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCPersistenceAdapterTest extends PersistenceAdapterTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java index 785137f..0c86237 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java @@ -24,6 +24,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCStoreBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java index 543d78e..a8ced99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java @@ -38,12 +38,14 @@ public class JDBCTestMemory extends TestCase { BrokerService broker; + @Override protected void setUp() throws Exception { broker = createBroker(); broker.start(); broker.waitUntilStarted(); } + @Override protected void tearDown() throws Exception { broker.stop(); } @@ -105,6 +107,7 @@ public class JDBCTestMemory extends TestCase { for (int i = 0; i < 10; i++) { new Thread("Producer " + i) { + @Override public void run() { try { MessageProducer producer = sess.createProducer(dest); @@ -125,6 +128,7 @@ public class JDBCTestMemory extends TestCase { new Thread("Consumer " + i) { + @Override public void run() { try { MessageConsumer consumer = sess.createConsumer(dest); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java index 9a3114e..cddbd71 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.PersistenceAdapterTestSupport; */ public class KahaDBPersistenceAdapterTest extends PersistenceAdapterTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException { KahaDBStore kaha = new KahaDBStore(); kaha.setDirectory(new File("target/activemq-data/kahadb")); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java index 4409d69..b8fef90 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java @@ -29,11 +29,13 @@ import org.apache.activemq.util.IOHelper; */ public class KahaDBStoreBrokerTest extends BrokerTest { + @Override protected void setUp() throws Exception { this.setAutoFail(true); super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java index f06d7f2..01271ad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java @@ -70,6 +70,7 @@ public class KahaDBStoreTest { for (int i = 0; i < MESSAGE_COUNT; i++) { final int id = ++i; executor.execute(new Runnable() { + @Override public void run() { try { Message msg = message.copy(); @@ -87,6 +88,7 @@ public class KahaDBStoreTest { for (int i = 0; i < MESSAGE_COUNT; i++) { final int id = ++i; executor2.execute(new Runnable() { + @Override public void run() { try { MessageAck ack = new MessageAck(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java index 865b27b..4316fc7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java @@ -28,6 +28,7 @@ import org.apache.activemq.broker.BrokerTest; */ public class TempKahaDBStoreBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java index 7e96d6a..5d52adb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.KahaDBStore; */ public class KahaStoreDurableTopicTest extends SimpleDurableTopicTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amqdb"); dataFileDir.mkdirs(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java index 75215b3..a2898f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.KahaDBStore; */ public class KahaStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amqdb"); dataFileDir.mkdirs(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java index 2c633cc..2575afd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.TempKahaDBStore; */ public class TempKahaStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/temp-amqdb"); dataFileDir.mkdirs(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java index c1977de..99583d5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java @@ -31,11 +31,13 @@ import org.apache.activemq.leveldb.LevelDBStore; */ public class LevelDBStoreBrokerTest extends BrokerTest { + @Override protected void setUp() throws Exception { this.setAutoFail(true); super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); LevelDBStore levelDBStore = new LevelDBStore(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java index cd04333..26b3700 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java @@ -67,6 +67,7 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); String temp = System.getProperty("messageCount"); @@ -229,6 +230,7 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test /** * @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/test/JmsTopicSendReceiveTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java index 37cd85f..1cfea7b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java @@ -35,6 +35,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -78,6 +79,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { connection.start(); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); // TODO http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java index 11b313a..adc7b55 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java @@ -25,10 +25,12 @@ import javax.jms.MessageConsumer; */ public class JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest extends JmsTopicSendReceiveWithTwoConnectionsTest { + @Override protected void configureMessage(Message message) throws JMSException { message.setByteProperty("dummy", (byte) 33); } + @Override protected MessageConsumer createConsumer() throws JMSException { return receiveSession.createConsumer(consumerDestination, "dummy = 33", false); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java index 4385242..4ad1aa4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java @@ -32,6 +32,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -39,6 +40,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); @@ -63,6 +65,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends answer.addConnector(bindAddress); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(bindAddress); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java index 39c9a17..00452d1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java @@ -42,6 +42,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); @@ -96,6 +97,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes /* * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { session.close(); receiveSession.close(); @@ -128,6 +130,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes * * @see org.apache.activemq.test.TestSupport#createConnectionFactory() */ + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java index 36fd737..ae841f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java @@ -34,6 +34,7 @@ public class DummyMessageQuery implements MessageQuery { public static final int MESSAGE_COUNT = 10; private static final Logger LOG = LoggerFactory.getLogger(DummyMessageQuery.class); + @Override public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception { LOG.info("Initial query is creating: " + MESSAGE_COUNT + " messages"); for (int i = 0; i < MESSAGE_COUNT; i++) { @@ -43,6 +44,7 @@ public class DummyMessageQuery implements MessageQuery { } } + @Override public boolean validateUpdate(Message message) { return true; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java index 4ca9af1..467aa9a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.test.retroactive; */ public class RetroactiveConsumerTestWithDestinationBasedBufferTest extends RetroactiveConsumerTestWithSimpleMessageListTest { + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java index 3ace712..7640f9c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java @@ -30,19 +30,23 @@ public class RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest extends private int counter = 1; + @Override protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException { ActiveMQTopic topic = new ActiveMQTopic(destination.getPhysicalName() + "." + (counter++)); producer.send(topic, message); } + @Override protected MessageProducer createProducer() throws JMSException { return session.createProducer(null); } + @Override protected MessageConsumer createConsumer() throws JMSException { return session.createConsumer(new ActiveMQTopic(destination.getPhysicalName() + ".>")); } + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java index 463d25e..220ba99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.test.retroactive; */ public class RetroactiveConsumerTestWithTimePolicyTest extends RetroactiveConsumerTestWithSimpleMessageListTest { + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-timed-policy.xml"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java index ea80c08..41e12e2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java @@ -97,6 +97,7 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport assertEquals(2, message.getLongProperty("JMSXDeliveryCount")); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -110,11 +111,13 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { // failover: enables message audit - which could get in the way of redelivery return new ActiveMQConnectionFactory("failover:" + bindAddress); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -124,6 +127,7 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport protected MessageCreator createMessageCreator(final int i) { return new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage answer = session.createTextMessage("Message: " + i); answer.setIntProperty("Counter", i); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java index 5953d46..8288925 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java @@ -51,6 +51,7 @@ public class DelegatingTransactionalMessageListener implements MessageListener { } } + @Override public void onMessage(Message message) { try { underlyingListener.onMessage(message); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java index 4b9b060..d748fd2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java @@ -104,6 +104,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup fail("Did not receive all the messages."); } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory answer = (ActiveMQConnectionFactory) super.createConnectionFactory(); RedeliveryPolicy policy = new RedeliveryPolicy(); @@ -115,6 +116,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup return answer; } + @Override protected void setUp() throws Exception { super.setUp(); @@ -128,6 +130,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -137,6 +140,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup protected MessageCreator createMessageCreator(final int i) { return new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage answer = session.createTextMessage("Message: " + i); answer.setIntProperty("Counter", i); @@ -145,6 +149,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup }; } + @Override public void onMessage(Message message) { String msgId = null; String msgText = null; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java index 901ea9a..9902bd2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java @@ -21,11 +21,13 @@ package org.apache.activemq.transport; */ public class QueueClusterTest extends TopicClusterTest { + @Override protected void setUp() throws Exception { topic = false; super.setUp(); } + @Override protected int expectedReceiveCount() { return MESSAGE_COUNT * NUMBER_IN_CLUSTER; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java index 91823e9..1b95006 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java @@ -41,6 +41,7 @@ public class SoWriteTimeoutClientTest extends JmsTestSupport { private static final Logger LOG = LoggerFactory.getLogger(SoWriteTimeoutClientTest.class); + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); broker.setDeleteAllMessagesOnStartup(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java index a2532b8..8cac437 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java @@ -48,6 +48,7 @@ public class SoWriteTimeoutTest extends JmsTestSupport { final int receiveBufferSize = 16 * 1024; public String brokerTransportScheme = "nio"; + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPersistent(true); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java ---------------------------------------------------------------------- diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java index bc15236..57b7062 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java @@ -31,6 +31,7 @@ public class StubCompositeTransport extends StubTransport implements CompositeTr /** * @see org.apache.activemq.transport.CompositeTransport#add(java.net.URI[]) */ + @Override public void add(boolean rebalance, URI[] uris) { transportURIs.addAll(Arrays.asList(uris)); } @@ -38,6 +39,7 @@ public class StubCompositeTransport extends StubTransport implements CompositeTr /** * @see org.apache.activemq.transport.CompositeTransport#remove(java.net.URI[]) */ + @Override public void remove(boolean rebalance, URI[] uris) { transportURIs.removeAll(Arrays.asList(uris)); }