http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java ---------------------------------------------------------------------- diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java index d171331..ee67b63 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java @@ -85,6 +85,7 @@ public final 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/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java ---------------------------------------------------------------------- diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java index 1f2f9cc..9088758 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java @@ -26,64 +26,80 @@ import org.objectweb.jtests.jms.admin.Admin; */ public class AbstractAdmin implements Admin { + @Override public String getName() { return getClass().getName(); } + @Override public void start() { } + @Override public void stop() throws Exception { } + @Override public InitialContext createContext() throws NamingException { return new InitialContext(); } + @Override public void createConnectionFactory(final String name) { throw new RuntimeException("FIXME NYI createConnectionFactory"); } + @Override public void deleteConnectionFactory(final String name) { throw new RuntimeException("FIXME NYI deleteConnectionFactory"); } + @Override public void createQueue(final String name) { throw new RuntimeException("FIXME NYI createQueue"); } + @Override public void deleteQueue(final String name) { throw new RuntimeException("FIXME NYI deleteQueue"); } + @Override public void createQueueConnectionFactory(final String name) { createConnectionFactory(name); } + @Override public void deleteQueueConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void createTopic(final String name) { throw new RuntimeException("FIXME NYI createTopic"); } + @Override public void deleteTopic(final String name) { throw new RuntimeException("FIXME NYI deleteTopic"); } + @Override public void createTopicConnectionFactory(final String name) { createConnectionFactory(name); } + @Override public void deleteTopicConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void startServer() { } + @Override public void stopServer() { } } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java ---------------------------------------------------------------------- diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java index f02902c..94ebed1 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java @@ -75,6 +75,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void start() throws Exception { serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); sf = serverLocator.createSessionFactory(); @@ -84,6 +85,7 @@ public class ActiveMQAdmin implements Admin { } + @Override public void stop() throws Exception { requestor.close(); @@ -99,6 +101,7 @@ public class ActiveMQAdmin implements Admin { serverLocator = null; } + @Override public void createConnectionFactory(final String name) { createConnection(name, 0); } @@ -113,10 +116,12 @@ public class ActiveMQAdmin implements Admin { } + @Override public Context createContext() throws NamingException { return context; } + @Override public void createQueue(final String name) { Boolean result; try { @@ -128,10 +133,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createQueueConnectionFactory(final String name) { createConnection(name, 1); } + @Override public void createTopic(final String name) { Boolean result; try { @@ -143,10 +150,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createTopicConnectionFactory(final String name) { createConnection(name, 2); } + @Override public void deleteConnectionFactory(final String name) { try { invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name); @@ -156,6 +165,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteQueue(final String name) { Boolean result; try { @@ -167,10 +177,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteQueueConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void deleteTopic(final String name) { Boolean result; try { @@ -182,14 +194,17 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteTopicConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public String getName() { return this.getClass().getName(); } + @Override public void startServer() throws Exception { if (!serverLifeCycleActive) { return; @@ -228,6 +243,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void stopServer() throws Exception { if (!serverLifeCycleActive) { return; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java ---------------------------------------------------------------------- diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java index 68b61fb..5892ee4 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java @@ -33,79 +33,95 @@ public class GenericAdmin implements Admin { public static Admin delegate = new AbstractAdmin(); + @Override public String getName() { String name = GenericAdmin.delegate.getName(); GenericAdmin.log.debug("Using admin '" + name + "' delegate=" + GenericAdmin.delegate); return name; } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { } + @Override public Context createContext() throws NamingException { Context ctx = GenericAdmin.delegate.createContext(); GenericAdmin.log.debug("Using initial context: " + ctx.getEnvironment()); return ctx; } + @Override public void createConnectionFactory(final String name) { GenericAdmin.log.debug("createConnectionFactory '" + name + "'"); GenericAdmin.delegate.createConnectionFactory(name); } + @Override public void deleteConnectionFactory(final String name) { GenericAdmin.log.debug("deleteConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteConnectionFactory(name); } + @Override public void createQueue(final String name) { GenericAdmin.log.debug("createQueue '" + name + "'"); GenericAdmin.delegate.createQueue(name); } + @Override public void deleteQueue(final String name) { GenericAdmin.log.debug("deleteQueue '" + name + "'"); GenericAdmin.delegate.deleteQueue(name); } + @Override public void createQueueConnectionFactory(final String name) { GenericAdmin.log.debug("createQueueConnectionFactory '" + name + "'"); GenericAdmin.delegate.createQueueConnectionFactory(name); } + @Override public void deleteQueueConnectionFactory(final String name) { GenericAdmin.log.debug("deleteQueueConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteQueueConnectionFactory(name); } + @Override public void createTopic(final String name) { GenericAdmin.log.debug("createTopic '" + name + "'"); GenericAdmin.delegate.createTopic(name); } + @Override public void deleteTopic(final String name) { GenericAdmin.log.debug("deleteTopic '" + name + "'"); GenericAdmin.delegate.deleteTopic(name); } + @Override public void createTopicConnectionFactory(final String name) { GenericAdmin.log.debug("createTopicConnectionFactory '" + name + "'"); GenericAdmin.delegate.createTopicConnectionFactory(name); } + @Override public void deleteTopicConnectionFactory(final String name) { GenericAdmin.log.debug("deleteTopicConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteTopicConnectionFactory(name); } + @Override public void startServer() throws Exception { GenericAdmin.log.debug("startEmbeddedServer"); GenericAdmin.delegate.startServer(); } + @Override public void stopServer() throws Exception { GenericAdmin.log.debug("stopEmbeddedServer"); GenericAdmin.delegate.stopServer(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java ---------------------------------------------------------------------- diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java index 26ed4bc..18c5fd9 100644 --- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java +++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java @@ -166,6 +166,7 @@ public class ConnectionTest extends PTPTestCase { receiverConnection.stop(); receiver.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message m) { try { Assert.fail("The message must not be received, the consumer connection is stopped"); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java ---------------------------------------------------------------------- diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java index 9c4a267..cbbc6f2 100644 --- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java +++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java @@ -27,6 +27,7 @@ public class MeasureCommitPerfTest extends AbstractSendReceivePerfTest { } /* This will by default send non persistent messages */ + @Override protected void sendMessages(Connection c, String qName) throws JMSException { Session s = c.createSession(true, Session.SESSION_TRANSACTED); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java ---------------------------------------------------------------------- diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java index 9a239fe..e0dc1f1 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java @@ -62,6 +62,7 @@ public class Receiver extends ClientAbstract { // Public -------------------------------------------------------- + @Override public void run() { super.run(); @@ -129,6 +130,7 @@ public class Receiver extends ClientAbstract { pendingMsgs = 0; } + @Override public String toString() { return "Receiver::" + this.queue + ", msgs=" + msgs + ", pending=" + pendingMsgs; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java ---------------------------------------------------------------------- diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java index e1d18cf..6d40e8c 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java @@ -53,6 +53,7 @@ public class Sender extends ClientAbstract { producer = session.createProducer(queue); } + @Override public void run() { super.run(); while (running) { @@ -94,6 +95,7 @@ public class Sender extends ClientAbstract { pendingMsgs = 0; } + @Override public String toString() { return "Sender, msgs=" + msgs + ", pending=" + pendingMsgs; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java index 54ac075..3bf033e 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java @@ -36,18 +36,23 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase { private static final LoaderCallback dummyLoader = new LoaderCallback() { + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void failedTransaction(final long transactionID, final List<RecordInfo> records, final List<RecordInfo> recordsToDelete) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java index 00a5ac2..20f1d77 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.stress.journal; public class AllPossibilitiesCompactStressTest extends MixupCompactorTestBase { + @Override public void internalTest() throws Exception { createJournal(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java index bfc2191..bbb4ec7 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.stress.journal; public class AllPossibilitiesCompactWithAddDeleteStressTest extends MixupCompactorTestBase { + @Override public void internalTest() throws Exception { createJournal(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java index 8d7dcab..2bab97b 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java @@ -123,6 +123,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { @Override protected void onCompactStart() throws Exception { testExecutor.execute(new Runnable() { + @Override public void run() { try { // System.out.println("OnCompactStart enter"); @@ -226,6 +227,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { final CountDownLatch latchExecutorDone = new CountDownLatch(1); testExecutor.execute(new Runnable() { + @Override public void run() { latchExecutorDone.countDown(); } @@ -266,6 +268,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { ArrayList<RecordInfo> committedRecords = new ArrayList<RecordInfo>(); ArrayList<PreparedTransactionInfo> preparedTransactions = new ArrayList<PreparedTransactionInfo>(); journal.load(committedRecords, preparedTransactions, new TransactionFailureCallback() { + @Override public void failedTransaction(long transactionID, List<RecordInfo> records, List<RecordInfo> recordsToDelete) { } }); @@ -332,9 +335,11 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { numberOfRecords.addAndGet(txSize); for (Long id : ids) { @@ -434,6 +439,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { this.ids = ids; } + @Override public void done() { rwLock.readLock().lock(); numberOfUpdates.addAndGet(ids.length); @@ -457,6 +463,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { } } + @Override public void onError(final int errorCode, final String errorMessage) { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java index 42750ae..a6133b2 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java @@ -83,6 +83,7 @@ public abstract class MixupCompactorTestBase extends JournalImplTestBase { File[] files = testDir.listFiles(new FilenameFilter() { + @Override public boolean accept(final File dir, final String name) { return name.startsWith(filePrefix) && name.endsWith(fileExtension); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java index b40976a..d0e127a 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java @@ -145,6 +145,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { PageSubscription cursorEven = createNonPersistentCursor(new Filter() { + @Override public boolean match(ServerMessage message) { Boolean property = message.getBooleanProperty("even"); if (property == null) { @@ -155,6 +156,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { } } + @Override public SimpleString getFilterString() { return new SimpleString("even=true"); } @@ -163,6 +165,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { PageSubscription cursorOdd = createNonPersistentCursor(new Filter() { + @Override public boolean match(ServerMessage message) { Boolean property = message.getBooleanProperty("even"); if (property == null) { @@ -173,6 +176,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { } } + @Override public SimpleString getFilterString() { return new SimpleString("even=true"); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java ---------------------------------------------------------------------- diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java index bd4a118..dbae369 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java @@ -71,6 +71,7 @@ public class PingStressTest extends ActiveMQTestBase { */ private void internalTest() throws Exception { Interceptor noPongInterceptor = new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { PingStressTest.log.info("In interceptor, packet is " + packet.getType()); if (packet.getType() == PacketImpl.PING) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java ---------------------------------------------------------------------- diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java index 2ff8886..896fda8 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java @@ -93,33 +93,42 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { protected static TransactionManager newTransactionManager() { return new TransactionManager() { + @Override public Transaction suspend() throws SystemException { return null; } + @Override public void setTransactionTimeout(final int arg0) throws SystemException { } + @Override public void setRollbackOnly() throws IllegalStateException, SystemException { } + @Override public void rollback() throws IllegalStateException, SecurityException, SystemException { } + @Override public void resume(final Transaction arg0) throws InvalidTransactionException, IllegalStateException, SystemException { } + @Override public Transaction getTransaction() throws SystemException { return null; } + @Override public int getStatus() throws SystemException { return 0; } + @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { } + @Override public void begin() throws NotSupportedException, SystemException { } }; @@ -127,6 +136,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static DestinationFactory newDestinationFactory(final Destination dest) { return new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return dest; } @@ -135,6 +145,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static ConnectionFactoryFactory newConnectionFactoryFactory(final ConnectionFactory cf) { return new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { return cf; } @@ -153,6 +164,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static ConnectionFactoryFactory newTCCLAwareConnectionFactoryFactory(final ConnectionFactory cf) { return new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { loadATCCLClass(); return cf; @@ -310,6 +322,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { final List<Message> messages = new LinkedList<Message>(); MessageListener listener = new MessageListener() { + @Override public void onMessage(final Message message) { messages.add(message); } @@ -368,6 +381,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { final List<Message> messages = new LinkedList<Message>(); final CountDownLatch latch = new CountDownLatch(numMessages); MessageListener listener = new MessageListener() { + @Override public void onMessage(final Message message) { messages.add(message); latch.countDown(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java ---------------------------------------------------------------------- diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java index a3b8426..6dca397 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java @@ -172,6 +172,7 @@ public class TokenBucketLimiterImplTest extends ActiveMQTestBase { TokenBucketLimiterImpl tbl = new TokenBucketLimiterImpl(rate, false, TimeUnit.SECONDS, window); Thread t = new Thread() { + @Override public void run() { int lastRun = 0; long lastTime = System.currentTimeMillis(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java index 988c1d5..d5a7f5a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java @@ -100,6 +100,7 @@ public abstract class AIOTestBase extends ActiveMQTestBase { final AtomicInteger timesDoneCalled = new AtomicInteger(0); + @Override public void done() { if (outputList != null) { outputList.add(order); @@ -111,6 +112,7 @@ public abstract class AIOTestBase extends ActiveMQTestBase { } } + @Override public void onError(final int errorCode, final String errorMessage) { errorCalled++; if (outputList != null) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java index 88fb109..549e61d 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java @@ -662,41 +662,51 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { static class FakeConsumerInternal implements ClientConsumerInternal { + @Override public ConsumerContext getConsumerContext() { return new ActiveMQConsumerContext(0); } + @Override public void close() throws ActiveMQException { } + @Override public Exception getLastException() { return null; } + @Override public MessageHandler getMessageHandler() throws ActiveMQException { return null; } + @Override public boolean isClosed() { return false; } + @Override public ClientMessage receive() throws ActiveMQException { return null; } + @Override public ClientMessage receive(final long timeout) throws ActiveMQException { return null; } + @Override public ClientMessage receiveImmediate() throws ActiveMQException { return null; } + @Override public FakeConsumerInternal setMessageHandler(final MessageHandler handler) throws ActiveMQException { return this; } + @Override public void acknowledge(final ClientMessage message) throws ActiveMQException { } @@ -704,31 +714,39 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { public void individualAcknowledge(ClientMessage message) throws ActiveMQException { } + @Override public void cleanUp() throws ActiveMQException { } + @Override public void clear(boolean waitForOnMessage) throws ActiveMQException { } + @Override public void clearAtFailover() { } + @Override public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException { } + @Override public void flushAcks() throws ActiveMQException { } + @Override public int getBufferSize() { return 0; } + @Override public int getClientWindowSize() { return 0; } + @Override public SimpleString getFilterString() { return null; @@ -739,11 +757,13 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { return 0; } + @Override public SimpleString getQueueName() { return null; } + @Override public boolean isBrowseOnly() { return false; @@ -764,6 +784,7 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { boolean isContinues) throws Exception { } + @Override public void start() { } @@ -772,9 +793,11 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { } + @Override public void stop(boolean waitForOnMessage) throws ActiveMQException { } + @Override public ClientSession.QueueQuery getQueueInfo() { return null; } @@ -790,6 +813,7 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal#prepareForClose() */ + @Override public Thread prepareForClose(FutureLatch future) throws ActiveMQException { return null; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java index 4ef03ce..110a621 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java @@ -39,6 +39,7 @@ public class ConnectorsServiceTest extends ActiveMQTestBase { private ServiceRegistry serviceRegistry; + @Override @Before public void setUp() throws Exception { // Setup Configuration http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java index bac9b89..97cd4fe 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java @@ -51,18 +51,23 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { private static final LoaderCallback dummyLoader = new LoaderCallback() { + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void failedTransaction(final long transactionID, final List<RecordInfo> records, final List<RecordInfo> recordsToDelete) { @@ -1305,6 +1310,7 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { incompleteTransactions.clear(); journalImpl.load(records, transactions, new TransactionFailureCallback() { + @Override public void failedTransaction(final long transactionID, final List<RecordInfo> records, final List<RecordInfo> recordsToDelete) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java index d67a2b2..4c6c4e7 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java @@ -210,6 +210,7 @@ public abstract class JournalImplTestBase extends ActiveMQTestBase { File dir = new File(getTestDir()); FilenameFilter fnf = new FilenameFilter() { + @Override public boolean accept(final File file, final String name) { return name.endsWith("." + fileExtension); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java index 47752e4..02f1e9e 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java @@ -35,6 +35,7 @@ import org.junit.Test; public abstract class JournalImplTestUnit extends JournalImplTestBase { + @Override @After public void tearDown() throws Exception { List<String> files = fileFactory.listFiles(fileExtension); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java index 4d3009f..53849c7 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java @@ -741,6 +741,7 @@ public class ReclaimerTest extends ActiveMQTestBase { public void extendOffset(final int delta) { } + @Override public SequentialFile getFile() { return null; } @@ -749,6 +750,7 @@ public class ReclaimerTest extends ActiveMQTestBase { return 0; } + @Override public long getFileID() { return 0; } @@ -756,6 +758,7 @@ public class ReclaimerTest extends ActiveMQTestBase { public void setOffset(final long offset) { } + @Override public int getNegCount(final JournalFile file) { Integer count = negCounts.get(file); @@ -767,6 +770,7 @@ public class ReclaimerTest extends ActiveMQTestBase { } } + @Override public void incNegCount(final JournalFile file) { Integer count = negCounts.get(file); @@ -777,22 +781,27 @@ public class ReclaimerTest extends ActiveMQTestBase { totalDep++; } + @Override public int getPosCount() { return posCount; } + @Override public void incPosCount() { posCount++; } + @Override public void decPosCount() { posCount--; } + @Override public boolean isCanReclaim() { return canDelete; } + @Override public void setCanReclaim(final boolean canDelete) { this.canDelete = canDelete; } @@ -859,6 +868,7 @@ public class ReclaimerTest extends ActiveMQTestBase { return 0; } + @Override public void addSize(final int bytes) { } @@ -869,6 +879,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getSize() */ + @Override public int getLiveSize() { return 0; } @@ -898,6 +909,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getRecordID() */ + @Override public int getRecordID() { return 0; } @@ -905,6 +917,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getTotalNegativeToOthers() */ + @Override public int getTotalNegativeToOthers() { return totalDep; } @@ -912,6 +925,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getJournalVersion() */ + @Override public int getJournalVersion() { return JournalImpl.FORMAT_VERSION; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java index f80beed..537cabf 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java @@ -48,9 +48,11 @@ public class TimedBufferTest extends ActiveMQTestBase { IOCallback dummyCallback = new IOCallback() { + @Override public void done() { } + @Override public void onError(final int errorCode, final String errorMessage) { } }; @@ -61,6 +63,7 @@ public class TimedBufferTest extends ActiveMQTestBase { final AtomicInteger flushTimes = new AtomicInteger(0); class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List<IOCallback> callbacks) { buffers.add(buffer); flushTimes.incrementAndGet(); @@ -69,10 +72,12 @@ public class TimedBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -127,6 +132,7 @@ public class TimedBufferTest extends ActiveMQTestBase { final AtomicInteger flushTimes = new AtomicInteger(0); class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List<IOCallback> callbacks) { buffers.add(buffer); flushTimes.incrementAndGet(); @@ -135,10 +141,12 @@ public class TimedBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -210,16 +218,19 @@ public class TimedBufferTest extends ActiveMQTestBase { public void testVerifySwitchToSpin() throws Exception { class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List<IOCallback> callbacks) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -285,16 +296,19 @@ public class TimedBufferTest extends ActiveMQTestBase { public void testStillSleeps() throws Exception { class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List<IOCallback> callbacks) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java index 820c93c..7ab0abf 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java @@ -66,6 +66,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { // Public -------------------------------------------------------- + @Override public SequentialFile createSequentialFile(final String fileName) { FakeSequentialFile sf = fileMap.get(fileName); @@ -83,6 +84,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return sf; } + @Override public void clearBuffer(final ByteBuffer buffer) { final int limit = buffer.limit(); buffer.rewind(); @@ -94,6 +96,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { buffer.rewind(); } + @Override public List<String> listFiles(final String extension) { List<String> files = new ArrayList<String>(); @@ -114,10 +117,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { fileMap.clear(); } + @Override public boolean isSupportsCallbacks() { return supportsCallback; } + @Override public ByteBuffer newBuffer(int size) { if (size % alignment != 0) { size = (size / alignment + 1) * alignment; @@ -125,6 +130,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return ByteBuffer.allocate(size); } + @Override public int calculateBlockSize(final int position) { int alignment = getAlignment(); @@ -133,6 +139,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return pos; } + @Override public ByteBuffer wrapBuffer(final byte[] bytes) { return ByteBuffer.wrap(bytes); } @@ -177,6 +184,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return callbacksInHold.size(); } + @Override public int getAlignment() { return alignment; } @@ -217,6 +225,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { this.callback = callback; } + @Override public void run() { if (sendError) { @@ -253,6 +262,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return data; } + @Override public boolean isOpen() { return open; } @@ -264,6 +274,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { this.fileName = fileName; } + @Override public synchronized void close() { open = false; @@ -274,6 +285,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { notifyAll(); } + @Override public void delete() { if (open) { close(); @@ -282,19 +294,23 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { fileMap.remove(fileName); } + @Override public String getFileName() { return fileName; } + @Override public void open() throws Exception { open(1, true); } + @Override public synchronized void open(final int currentMaxIO, final boolean useExecutor) throws Exception { open = true; checkAndResize(0); } + @Override public void fill(final int size) throws Exception { if (!open) { throw new IllegalStateException("Is closed"); @@ -312,10 +328,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public int read(final ByteBuffer bytes) throws Exception { return read(bytes, null); } + @Override public int read(final ByteBuffer bytes, final IOCallback callback) throws Exception { if (!open) { throw new IllegalStateException("Is closed"); @@ -347,10 +365,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { data.position((int) pos); } + @Override public long position() { return data.position(); } + @Override public synchronized void writeDirect(final ByteBuffer bytes, final boolean sync, final IOCallback callback) { if (!open) { throw new IllegalStateException("Is closed"); @@ -379,12 +399,14 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } + @Override public void sync() throws IOException { if (supportsCallback) { throw new IllegalStateException("sync is not supported when supportsCallback=true"); } } + @Override public long size() throws Exception { if (data == null) { return 0; @@ -394,6 +416,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception { writeDirect(bytes, sync, null); } @@ -434,10 +457,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public int getAlignment() throws Exception { return alignment; } + @Override public int calculateBlockStart(final int position) throws Exception { int pos = (position / alignment + (position % alignment != 0 ? 1 : 0)) * alignment; @@ -458,6 +483,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#renameTo(org.apache.activemq.artemis.core.io.SequentialFile) */ + @Override public void renameTo(final String newFileName) throws Exception { fileMap.remove(fileName); fileName = newFileName; @@ -467,6 +493,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#fits(int) */ + @Override public boolean fits(final int size) { return data.position() + size <= data.limit(); } @@ -489,6 +516,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { public void enableAutoFlush() { } + @Override public SequentialFile cloneFile() { return null; // To change body of implemented methods use File | Settings | File Templates. } @@ -496,6 +524,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer, boolean, org.apache.activemq.artemis.core.journal.IOCallback) */ + @Override public void write(final ActiveMQBuffer bytes, final boolean sync, final IOCallback callback) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -506,6 +535,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer, boolean) */ + @Override public void write(final ActiveMQBuffer bytes, final boolean sync) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -515,6 +545,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.core.journal.EncodingSupport, boolean, org.apache.activemq.artemis.core.journal.IOCompletion) */ + @Override public void write(final EncodingSupport bytes, final boolean sync, final IOCallback callback) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); @@ -525,6 +556,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.core.journal.EncodingSupport, boolean) */ + @Override public void write(final EncodingSupport bytes, final boolean sync) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); @@ -535,6 +567,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#exists() */ + @Override public boolean exists() { FakeSequentialFile file = fileMap.get(fileName); @@ -544,12 +577,14 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#setTimedBuffer(org.apache.activemq.artemis.core.io.buffer.TimedBuffer) */ + @Override public void setTimedBuffer(final TimedBuffer buffer) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#copyTo(org.apache.activemq.artemis.core.io.SequentialFile) */ + @Override public void copyTo(SequentialFile newFileName) { // TODO Auto-generated method stub http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java index 87acb21..42a0631 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java @@ -41,17 +41,20 @@ public class SimpleEncoding implements EncodingSupport { } // Public -------------------------------------------------------- + @Override public void decode(final ActiveMQBuffer buffer) { throw new UnsupportedOperationException(); } + @Override public void encode(final ActiveMQBuffer buffer) { for (int i = 0; i < size; i++) { buffer.writeByte(bytetosend); } } + @Override public int getEncodeSize() { return size; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java index 719da0a..e1dd4cc 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java @@ -51,9 +51,11 @@ public class OperationContextUnitTest extends ActiveMQTestBase { impl.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { latch1.countDown(); } @@ -68,9 +70,11 @@ public class OperationContextUnitTest extends ActiveMQTestBase { impl.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { latch2.countDown(); } @@ -193,10 +197,12 @@ public class OperationContextUnitTest extends ActiveMQTestBase { // We should be up to date with lineUps and executions. this should now just finish processing context.executeOnCompletion(new IOCallback() { + @Override public void done() { operations.incrementAndGet(); } + @Override public void onError(final int errorCode, final String errorMessage) { failures.incrementAndGet(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java index 3bfd628..a644718 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java @@ -104,6 +104,7 @@ public class BindingsImplTest extends ActiveMQTestBase { private final class FakeTransaction implements Transaction { + @Override public void addOperation(final TransactionOperation sync) { } @@ -113,28 +114,34 @@ public class BindingsImplTest extends ActiveMQTestBase { return false; } + @Override public boolean hasTimedOut(long currentTime, int defaultTimeout) { return false; } + @Override public void commit() throws Exception { } + @Override public void commit(final boolean onePhase) throws Exception { } + @Override public long getCreateTime() { return 0; } + @Override public long getID() { return 0; } + @Override public Object getProperty(final int index) { return null; @@ -145,23 +152,28 @@ public class BindingsImplTest extends ActiveMQTestBase { return false; } + @Override public State getState() { return null; } + @Override public Xid getXid() { return null; } + @Override public void markAsRollbackOnly(final ActiveMQException exception) { } + @Override public void prepare() throws Exception { } + @Override public void putProperty(final int index, final Object property) { } @@ -170,6 +182,7 @@ public class BindingsImplTest extends ActiveMQTestBase { } + @Override public void resume() { } @@ -177,6 +190,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#rollback() */ + @Override public void rollback() throws Exception { } @@ -184,6 +198,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#setState(org.apache.activemq.artemis.core.transaction.Transaction.State) */ + @Override public void setState(final State state) { } @@ -191,6 +206,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#suspend() */ + @Override public void suspend() { } @@ -202,14 +218,17 @@ public class BindingsImplTest extends ActiveMQTestBase { return Collections.emptySet(); } + @Override public void setContainsPersistent() { } + @Override public void setTimeout(int timeout) { } + @Override public List<TransactionOperation> getAllOperations() { return null; } @@ -229,6 +248,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.filter.Filter#getFilterString() */ + @Override public SimpleString getFilterString() { return null; } @@ -236,6 +256,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.filter.Filter#match(org.apache.activemq.artemis.core.server.ServerMessage) */ + @Override public boolean match(final ServerMessage message) { return false; } @@ -244,6 +265,7 @@ public class BindingsImplTest extends ActiveMQTestBase { private final class FakeBinding implements Binding { + @Override public void close() throws Exception { } @@ -259,6 +281,7 @@ public class BindingsImplTest extends ActiveMQTestBase { this.name = name; } + @Override public SimpleString getAddress() { return null; } @@ -266,6 +289,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getBindable() */ + @Override public Bindable getBindable() { return null; @@ -274,6 +298,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getClusterName() */ + @Override public SimpleString getClusterName() { return null; @@ -282,6 +307,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getDistance() */ + @Override public int getDistance() { return 0; } @@ -289,10 +315,12 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getFilter() */ + @Override public Filter getFilter() { return new FakeFilter(); } + @Override public long getID() { return 0; } @@ -300,6 +328,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getRoutingName() */ + @Override public SimpleString getRoutingName() { return name; } @@ -307,6 +336,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getType() */ + @Override public BindingType getType() { return null; @@ -315,18 +345,22 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getUniqueName() */ + @Override public SimpleString getUniqueName() { return null; } + @Override public boolean isExclusive() { return false; } + @Override public boolean isHighAcceptPriority(final ServerMessage message) { return false; } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java index 4aefc9a..d53a51e 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java @@ -45,6 +45,7 @@ public class FakeQueue implements Queue { public void deleteQueue(boolean removeConsumers) throws Exception { } + @Override public void unproposed(SimpleString groupID) { } @@ -72,11 +73,13 @@ public class FakeQueue implements Queue { PageSubscription subs; + @Override public boolean isDirectDeliver() { // no-op return false; } + @Override public void close() { // no-op @@ -87,35 +90,42 @@ public class FakeQueue implements Queue { } + @Override public void reload(MessageReference ref) { // no-op } + @Override public boolean flushExecutor() { return true; } + @Override public void addHead(MessageReference ref) { // no-op } + @Override public void addHead(List<MessageReference> ref) { // no-op } + @Override public void addTail(MessageReference ref, boolean direct) { // no-op } + @Override public void addTail(MessageReference ref) { // no-op } + @Override public void resetAllIterators() { // no-op @@ -323,6 +333,7 @@ public class FakeQueue implements Queue { return name; } + @Override public SimpleString getAddress() { // no-op return null; @@ -404,11 +415,13 @@ public class FakeQueue implements Queue { } + @Override public void referenceHandled() { // no-op } + @Override public void removeConsumer(final Consumer consumer) { } @@ -417,21 +430,25 @@ public class FakeQueue implements Queue { return null; } + @Override public MessageReference removeReferenceWithID(final long id1) throws Exception { // no-op return null; } + @Override public void resume() { // no-op } + @Override public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception { // no-op return false; } + @Override public int sendMessagesToDeadLetterAddress(Filter filter) throws Exception { // no-op return 0; @@ -453,11 +470,13 @@ public class FakeQueue implements Queue { } + @Override public boolean hasMatchingConsumer(final ServerMessage message) { // no-op return false; } + @Override public Executor getExecutor() { // no-op return null; @@ -515,6 +534,7 @@ public class FakeQueue implements Queue { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.server.Queue#destroyPaging() */ + @Override public void destroyPaging() { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java index 6c298f6..6f17770 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java @@ -73,6 +73,7 @@ public class WildcardAddressManagerUnitTest extends ActiveMQTestBase { class BindingFactoryFake implements BindingsFactory { + @Override public Bindings createBindings(SimpleString address) throws Exception { return new BindignsFake(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java index 4701228..a8fdfab 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java @@ -43,23 +43,28 @@ public class NettyAcceptorFactoryTest extends ActiveMQTestBase { Map<String, Object> params = new HashMap<String, Object>(); BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java index 7743020..55aae43 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java @@ -66,6 +66,7 @@ public class NettyAcceptorTest extends ActiveMQTestBase { public void testStartStop() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -73,17 +74,21 @@ public class NettyAcceptorTest extends ActiveMQTestBase { Map<String, Object> params = new HashMap<String, Object>(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java index a4e6810..b96a9be 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java @@ -78,20 +78,24 @@ public class NettyConnectionTest extends ActiveMQTestBase { class MyListener implements ConnectionLifeCycleListener { + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java index ca9bf0d..fb6a5d8 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java @@ -39,22 +39,27 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testStartStop() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map<String, Object> params = new HashMap<String, Object>(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -70,22 +75,27 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testNullParams() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map<String, Object> params = new HashMap<String, Object>(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -112,6 +122,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testJavaSystemPropertyOverrides() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -122,17 +133,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -153,6 +168,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testActiveMQSystemPropertyOverrides() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -163,17 +179,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -199,6 +219,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testBadCipherSuite() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -206,17 +227,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true); params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -233,6 +258,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testBadProtocol() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -240,17 +266,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true); params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java ---------------------------------------------------------------------- diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java index f351dfb..838c829 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java @@ -47,6 +47,7 @@ public class FakeAcceptorFactory implements AcceptorFactory { private final class FakeAcceptor implements Acceptor { + @Override public String getName() { return "fake"; }