You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/04/11 22:51:36 UTC
[1/2] activemq-artemis git commit: Add missing @Overrides
Repository: activemq-artemis
Updated Branches:
refs/heads/master e285c2f30 -> fbff5e7dd
Add missing @Overrides
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e6e1311f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e6e1311f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e6e1311f
Branch: refs/heads/master
Commit: e6e1311f8d4c722d4e52177e714d2430989bd717
Parents: e285c2f
Author: Ville Skyttä <vi...@iki.fi>
Authored: Sun Apr 10 09:54:50 2016 +0300
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Apr 11 16:51:01 2016 -0400
----------------------------------------------------------------------
.../protocol/openwire/OpenWireProtocolManager.java | 1 +
.../artemis/core/protocol/openwire/amq/AMQSession.java | 2 ++
.../artemis/core/config/impl/ConfigurationImpl.java | 1 +
.../artemis/core/paging/impl/PagingStoreImpl.java | 1 +
.../artemis/core/server/impl/MessageReferenceImpl.java | 1 +
.../activemq/artemis/core/server/impl/QueueImpl.java | 1 +
.../artemis/core/server/impl/ServerConsumerImpl.java | 1 +
.../artemis/core/server/impl/ServerSessionImpl.java | 5 +++++
.../java/org/apache/activemq/AutoFailTestSupport.java | 3 +++
.../org/apache/activemq/EmbeddedBrokerTestSupport.java | 1 +
.../org/apache/activemq/JmsQueueTransactionTest.java | 1 +
.../apache/activemq/transport/TopicClusterTest.java | 1 +
.../activemq/transport/failover/AMQ1925Test.java | 3 +++
.../FailoverConsumerOutstandingCommitTest.java | 5 +++++
.../failover/FailoverConsumerUnconsumedTest.java | 9 +++++++++
.../transport/failover/FailoverPrefetchZeroTest.java | 2 ++
.../transport/failover/FailoverTransactionTest.java | 13 +++++++++++++
.../transport/fanout/FanoutTransportBrokerTest.java | 2 ++
.../java/org/apache/activemq/util/SocketProxy.java | 2 ++
.../RaceOnSyncLargeMessageOverReplication2Test.java | 1 +
.../RaceOnSyncLargeMessageOverReplicationTest.java | 1 +
.../performance/storage/PersistMultiThreadTest.java | 1 +
22 files changed, 58 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
index 7d9c25a..b08d26c 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java
@@ -139,6 +139,7 @@ public class OpenWireProtocolManager implements ProtocolManager<Interceptor>, Cl
}
}
+ @Override
public void nodeDown(long eventUID, String nodeID) {
if (topologyMap.remove(nodeID) != null) {
updateClientClusterInfo();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
index 84354cd..563608d 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
@@ -278,6 +278,7 @@ public class AMQSession implements SessionCallback {
if (sendProducerAck) {
runnable = new Runnable() {
+ @Override
public void run() {
try {
ProducerAck ack = new ProducerAck(producerInfo.getProducerId(), messageSend.getSize());
@@ -302,6 +303,7 @@ public class AMQSession implements SessionCallback {
}
else {
runnable = new Runnable() {
+ @Override
public void run() {
transportConnection.setAutoRead(true);
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
index de0a2fd..8b898b0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
@@ -1317,6 +1317,7 @@ public class ConfigurationImpl implements Configuration, Serializable {
return tcConfigs;
}
+ @Override
public String debugConnectors() {
StringWriter stringWriter = new StringWriter();
PrintWriter writer = new PrintWriter(stringWriter);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
index 1463b3c..9a0af15 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
@@ -1063,6 +1063,7 @@ public class PagingStoreImpl implements PagingStore {
}
// To be used on isDropMessagesWhenFull
+ @Override
public boolean isFull() {
return maxSize > 0 && getAddressSize() > maxSize;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
index de4d5ae..c5f8485 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
@@ -190,6 +190,7 @@ public class MessageReferenceImpl implements MessageReference {
this.acknowledge(null);
}
+ @Override
public void acknowledge(Transaction tx) throws Exception {
if (tx == null) {
getQueue().acknowledge(this);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 75f0f98..449704b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -2337,6 +2337,7 @@ public class QueueImpl implements Queue {
}
}
+ @Override
public void sendToDeadLetterAddress(final Transaction tx, final MessageReference ref) throws Exception {
sendToDeadLetterAddress(tx, ref, addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress());
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
index 5fb6018..7071da6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
@@ -736,6 +736,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
* This method will fetch the delivering references, remove them from the delivering list and return a list.
*
* This will be useful for other protocols that will need this such as openWire or MQTT. */
+ @Override
public List<MessageReference> getDeliveringReferencesBasedOnProtocol(boolean remove, Object protocolDataStart, Object protocolDataEnd) {
LinkedList<MessageReference> retReferences = new LinkedList<>();
boolean hit = false;
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index 7a817f0..bccf992 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -253,6 +253,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
this.securityEnabled = false;
}
+ @Override
public boolean isClosed() {
return closed;
}
@@ -395,6 +396,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
return this.createConsumer(consumerID, queueName, filterString, browseOnly, true, null);
}
+ @Override
public ServerConsumer createConsumer(final long consumerID,
final SimpleString queueName,
final SimpleString filterString,
@@ -458,6 +460,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
/** Some protocols may chose to hold their transactions outside of the ServerSession.
* This can be used to replace the transaction.
* Notice that we set autoCommitACK and autoCommitSends to true if tx == null */
+ @Override
public void resetTX(Transaction transaction) {
this.tx = transaction;
this.autoCommitAcks = transaction == null;
@@ -648,6 +651,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
}
}
+ @Override
public ServerConsumer locateConsumer(long consumerID) {
return consumers.get(consumerID);
}
@@ -756,6 +760,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
/**
* @return
*/
+ @Override
public Transaction newTransaction() {
return new TransactionImpl(null, storageManager, timeoutSeconds);
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/AutoFailTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/AutoFailTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/AutoFailTestSupport.java
index f47620f..519536d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/AutoFailTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/AutoFailTestSupport.java
@@ -44,6 +44,7 @@ public abstract class AutoFailTestSupport extends TestCase {
private boolean useAutoFail; // Disable auto fail by default
private AtomicBoolean isTestSuccess;
+ @Override
protected void setUp() throws Exception {
// Runs the auto fail thread before performing any setup
if (isAutoFail()) {
@@ -52,6 +53,7 @@ public abstract class AutoFailTestSupport extends TestCase {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
@@ -69,6 +71,7 @@ public abstract class AutoFailTestSupport extends TestCase {
setAutoFail(true);
isTestSuccess = new AtomicBoolean(false);
autoFailThread = new Thread(new Runnable() {
+ @Override
public void run() {
try {
// Wait for test to finish succesfully
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
index 1e6a227..49ef298 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
@@ -52,6 +52,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport {
public String CLUSTER_PASSWORD = "OPENWIRECLUSTER";
+ @Override
protected void setUp() throws Exception {
BrokerService.disableWrapper = disableWrapper;
File tmpRoot = new File("./target/tmp");
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
index b7c2e94..e74bc0f 100755
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTransactionTest.java
@@ -40,6 +40,7 @@ public class JmsQueueTransactionTest extends JmsTransactionTestSupport {
/**
* @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider()
*/
+ @Override
protected JmsResourceProvider getJmsResourceProvider() {
JmsResourceProvider p = new JmsResourceProvider();
p.setTopic(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
index c2a7d24..704f97b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
@@ -139,6 +139,7 @@ public class TopicClusterTest extends OpenwireArtemisBaseTest implements Message
}
}
+ @Override
public void onMessage(Message msg) {
// log.info("GOT: " + msg);
receivedMessageCount.incrementAndGet();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
index 564fd86..bc7b44b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java
@@ -75,6 +75,7 @@ public class AMQ1925Test extends OpenwireArtemisBaseTest implements ExceptionLis
final CountDownLatch starter = new CountDownLatch(1);
final AtomicBoolean restarted = new AtomicBoolean();
new Thread(new Runnable() {
+ @Override
public void run() {
try {
starter.await();
@@ -130,6 +131,7 @@ public class AMQ1925Test extends OpenwireArtemisBaseTest implements ExceptionLis
final CountDownLatch starter = new CountDownLatch(1);
final AtomicBoolean restarted = new AtomicBoolean();
new Thread(new Runnable() {
+ @Override
public void run() {
try {
starter.await();
@@ -375,6 +377,7 @@ public class AMQ1925Test extends OpenwireArtemisBaseTest implements ExceptionLis
}
}
+ @Override
public void onException(JMSException exception) {
this.exception = exception;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
index 40cbccb..09af25e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java
@@ -117,6 +117,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
doByteman.set(true);
testConsumer.setMessageListener(new MessageListener() {
+ @Override
public void onMessage(Message message) {
LOG.info("consume one and commit");
@@ -136,6 +137,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
// may block if broker shutodwn happens quickly
new Thread() {
+ @Override
public void run() {
LOG.info("producer started");
try {
@@ -231,6 +233,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
doByteman.set(true);
testConsumer.setMessageListener(new MessageListener() {
+ @Override
public void onMessage(Message message) {
LOG.info("consume one: " + message);
assertNotNull("got message", message);
@@ -253,6 +256,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
// may block if broker shutdown happens quickly
new Thread() {
+ @Override
public void run() {
LOG.info("producer started");
try {
@@ -364,6 +368,7 @@ public class FailoverConsumerOutstandingCommitTest extends OpenwireArtemisBaseTe
public static void stopServerInTransaction() {
if (doByteman.get()) {
new Thread() {
+ @Override
public void run() {
LOG.info("Stopping broker in transaction...");
try {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
index fb9479c..b0ee7ba 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java
@@ -167,6 +167,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
produceMessage(consumerSession, destination, maxConsumers * prefetch);
assertTrue("add messages are delivered", Wait.waitFor(new Wait.Condition() {
+ @Override
public boolean isSatisified() throws Exception {
int totalDelivered = 0;
for (TestConsumer testConsumer : testConsumers) {
@@ -181,6 +182,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
final CountDownLatch shutdownConsumerAdded = new CountDownLatch(1);
new Thread() {
+ @Override
public void run() {
try {
LOG.info("add last consumer...");
@@ -216,6 +218,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
// each should again get prefetch messages - all unacked deliveries should be rolledback
assertTrue("after restart all messages are re dispatched", Wait.waitFor(new Wait.Condition() {
+ @Override
public boolean isSatisified() throws Exception {
int totalDelivered = 0;
for (TestConsumer testConsumer : testConsumers) {
@@ -259,6 +262,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
produceMessage(consumerSession, destination, maxConsumers * prefetch);
assertTrue("add messages are dispatched", Wait.waitFor(new Wait.Condition() {
+ @Override
public boolean isSatisified() throws Exception {
int totalUnconsumed = 0;
for (TestConsumer testConsumer : testConsumers) {
@@ -273,6 +277,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
final CountDownLatch shutdownConsumerAdded = new CountDownLatch(1);
new Thread() {
+ @Override
public void run() {
try {
LOG.info("add last consumer...");
@@ -288,6 +293,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
// verify interrupt
assertTrue("add messages dispatched and unconsumed are cleaned up", Wait.waitFor(new Wait.Condition() {
+ @Override
public boolean isSatisified() throws Exception {
int totalUnconsumed = 0;
for (TestConsumer testConsumer : testConsumers) {
@@ -309,6 +315,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
// each should again get prefetch messages - all unconsumed deliveries should be rolledback
assertTrue("after start all messages are re dispatched", Wait.waitFor(new Wait.Condition() {
+ @Override
public boolean isSatisified() throws Exception {
int totalUnconsumed = 0;
for (TestConsumer testConsumer : testConsumers) {
@@ -365,6 +372,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
if (consumerCount.incrementAndGet() == maxConsumers) {
context.getContext().setDontSendReponse(true);
new Thread() {
+ @Override
public void run() {
try {
broker.stop();
@@ -384,6 +392,7 @@ public class FailoverConsumerUnconsumedTest extends OpenwireArtemisBaseTest {
if (consumerCount.incrementAndGet() == maxConsumers + (watchTopicAdvisories.get() ? 1 : 0)) {
context.getContext().setDontSendReponse(true);
new Thread() {
+ @Override
public void run() {
try {
broker.stop();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
index 64c1ccd..92ddd5b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java
@@ -102,6 +102,7 @@ public class FailoverPrefetchZeroTest extends OpenwireArtemisBaseTest {
final CountDownLatch receiveDone = new CountDownLatch(1);
final Vector<Message> received = new Vector<>();
new Thread() {
+ @Override
public void run() {
try {
LOG.info("receive one...");
@@ -147,6 +148,7 @@ public class FailoverPrefetchZeroTest extends OpenwireArtemisBaseTest {
context.getContext().setDontSendReponse(true);
pullDone.countDown();
new Thread() {
+ @Override
public void run() {
try {
broker.stop();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
index e704274..00ff4b5 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java
@@ -165,6 +165,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final CountDownLatch commitDoneLatch = new CountDownLatch(1);
// broker will die on commit reply so this will hang till restart
new Thread() {
+ @Override
public void run() {
LOG.info("doing async commit...");
try {
@@ -259,6 +260,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final CountDownLatch sendDoneLatch = new CountDownLatch(1);
// broker will die on send reply so this will hang till restart
new Thread() {
+ @Override
public void run() {
LOG.info("doing async send...");
try {
@@ -348,6 +350,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final CountDownLatch sendDoneLatch = new CountDownLatch(1);
// proxy connection will die on send reply so this will hang on failover reconnect till open
new Thread() {
+ @Override
public void run() {
LOG.info("doing async send...");
try {
@@ -476,12 +479,15 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final Session poolSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
connection.createConnectionConsumer(destination, null, new ServerSessionPool() {
+ @Override
public ServerSession getServerSession() throws JMSException {
return new ServerSession() {
+ @Override
public Session getSession() throws JMSException {
return poolSession;
}
+ @Override
public void start() throws JMSException {
connectionConsumerGotOne.countDown();
poolSession.run();
@@ -584,6 +590,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final CountDownLatch commitDoneLatch = new CountDownLatch(1);
final AtomicBoolean gotTransactionRolledBackException = new AtomicBoolean(false);
Thread t = new Thread("doTestFailoverConsumerAckLost(" + pauseSeconds + ")") {
+ @Override
public void run() {
LOG.info("doing async commit after consume...");
try {
@@ -774,6 +781,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
for (int i = 0; i < consumerCount && !consumers.isEmpty(); i++) {
executorService.execute(new Runnable() {
+ @Override
public void run() {
MessageConsumer localConsumer = null;
try {
@@ -915,6 +923,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
final CountDownLatch commitDone = new CountDownLatch(1);
// will block pending re-deliveries
new Thread() {
+ @Override
public void run() {
LOG.info("doing async commit...");
try {
@@ -970,6 +979,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
// commit may fail if other consumer gets the message on restart
new Thread() {
+ @Override
public void run() {
LOG.info("doing async commit...");
try {
@@ -1017,6 +1027,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
if (doByteman.get()) {
context.getContext().setDontSendReponse(true);
new Thread() {
+ @Override
public void run() {
LOG.info("Stopping broker post commit...");
try {
@@ -1040,6 +1051,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
firstSend = false;
context.getContext().setDontSendReponse(true);
new Thread() {
+ @Override
public void run() {
LOG.info("Stopping connection post send...");
try {
@@ -1060,6 +1072,7 @@ public class FailoverTransactionTest extends OpenwireArtemisBaseTest {
if (count++ == 1) {
LOG.info("ok stop broker...");
new Thread() {
+ @Override
public void run() {
try {
if (broker != null) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
index 2cfc136..72cc3f7 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
@@ -219,6 +219,7 @@ public class FanoutTransportBrokerTest extends OpenwireArtemisBaseTest {
// Slip in a new transport filter after the MockTransport
MockTransport mt = (MockTransport) connection3.getTransport().narrow(MockTransport.class);
mt.install(new TransportFilter(mt.getNext()) {
+ @Override
public void oneway(Object command) throws IOException {
LOG.info("Dropping: " + command);
// just eat it! to simulate a recent failure.
@@ -227,6 +228,7 @@ public class FanoutTransportBrokerTest extends OpenwireArtemisBaseTest {
// Send a message (async) as this will block
new Thread() {
+ @Override
public void run() {
// Send the message using the fail over publisher.
try {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
index b01a4e1..ca9b42a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/SocketProxy.java
@@ -305,6 +305,7 @@ public class SocketProxy {
pause.get().countDown();
}
+ @Override
public void run() {
byte[] buf = new byte[1024];
try {
@@ -360,6 +361,7 @@ public class SocketProxy {
pause.get().countDown();
}
+ @Override
public void run() {
try {
while(!socket.isClosed()) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplication2Test.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplication2Test.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplication2Test.java
index f8d1b04..95bd028 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplication2Test.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplication2Test.java
@@ -188,6 +188,7 @@ public class RaceOnSyncLargeMessageOverReplication2Test extends ActiveMQTestBase
final MapMessage message = createLargeMessage();
t = new Thread() {
+ @Override
public void run() {
try {
producer.send(message);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplicationTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplicationTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplicationTest.java
index d1bf50f..435f134 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplicationTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/RaceOnSyncLargeMessageOverReplicationTest.java
@@ -170,6 +170,7 @@ public class RaceOnSyncLargeMessageOverReplicationTest extends ActiveMQTestBase
final MapMessage message = createLargeMessage();
t = new Thread() {
+ @Override
public void run() {
try {
producer.send(message);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6e1311f/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/storage/PersistMultiThreadTest.java
----------------------------------------------------------------------
diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/storage/PersistMultiThreadTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/storage/PersistMultiThreadTest.java
index cd08b9e..33ee0c7 100644
--- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/storage/PersistMultiThreadTest.java
+++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/storage/PersistMultiThreadTest.java
@@ -301,6 +301,7 @@ public class PersistMultiThreadTest extends ActiveMQTestBase {
return 0;
}
+ @Override
public boolean isFull() {
return false;
}
[2/2] activemq-artemis git commit: This closes #449
Posted by cl...@apache.org.
This closes #449
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fbff5e7d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fbff5e7d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fbff5e7d
Branch: refs/heads/master
Commit: fbff5e7dd61bc4705e1b7d37fd29be75aca59bd3
Parents: e285c2f e6e1311
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon Apr 11 16:51:02 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Apr 11 16:51:02 2016 -0400
----------------------------------------------------------------------
.../protocol/openwire/OpenWireProtocolManager.java | 1 +
.../artemis/core/protocol/openwire/amq/AMQSession.java | 2 ++
.../artemis/core/config/impl/ConfigurationImpl.java | 1 +
.../artemis/core/paging/impl/PagingStoreImpl.java | 1 +
.../artemis/core/server/impl/MessageReferenceImpl.java | 1 +
.../activemq/artemis/core/server/impl/QueueImpl.java | 1 +
.../artemis/core/server/impl/ServerConsumerImpl.java | 1 +
.../artemis/core/server/impl/ServerSessionImpl.java | 5 +++++
.../java/org/apache/activemq/AutoFailTestSupport.java | 3 +++
.../org/apache/activemq/EmbeddedBrokerTestSupport.java | 1 +
.../org/apache/activemq/JmsQueueTransactionTest.java | 1 +
.../apache/activemq/transport/TopicClusterTest.java | 1 +
.../activemq/transport/failover/AMQ1925Test.java | 3 +++
.../FailoverConsumerOutstandingCommitTest.java | 5 +++++
.../failover/FailoverConsumerUnconsumedTest.java | 9 +++++++++
.../transport/failover/FailoverPrefetchZeroTest.java | 2 ++
.../transport/failover/FailoverTransactionTest.java | 13 +++++++++++++
.../transport/fanout/FanoutTransportBrokerTest.java | 2 ++
.../java/org/apache/activemq/util/SocketProxy.java | 2 ++
.../RaceOnSyncLargeMessageOverReplication2Test.java | 1 +
.../RaceOnSyncLargeMessageOverReplicationTest.java | 1 +
.../performance/storage/PersistMultiThreadTest.java | 1 +
22 files changed, 58 insertions(+)
----------------------------------------------------------------------