From 64ecb9565dea42c7381e9a70a08339cafff7c960 Mon Sep 17 00:00:00 2001 From: Thiago Kronig Date: Wed, 10 Jun 2015 13:24:37 -0300 Subject: [PATCH] ARTEMIS-127 Use L as suffix for long constants --- ...bRestartJDBCQueueMasterSlaveLeaseTest.java | 2 +- .../broker/region/QueuePurgeTest.java | 2 +- .../cursors/StoreQueueCursorOrderTest.java | 46 +++++++++---------- .../broker/scheduler/JmsSchedulerTest.java | 8 ++-- .../org/apache/activemq/bugs/AMQ2314Test.java | 2 +- .../activemq/bugs/AMQ4485LowLimitTest.java | 8 ++-- ...rokersWithNDestsFanoutTransactionTest.java | 4 +- .../org/apache/activemq/bugs/AMQ4636Test.java | 4 +- .../activemq/bugs/AMQ5266SingleDestTest.java | 2 +- .../bugs/TrapMessageInJDBCStoreTest.java | 4 +- .../command/ActiveMQStreamMessageTest.java | 2 +- .../jdbc/JDBCIOExceptionHandlerTest.java | 12 ++--- .../store/jdbc/JDBCMessagePriorityTest.java | 2 +- .../store/jdbc/LeaseDatabaseLockerTest.java | 2 +- .../store/kahadb/KahaDBFastEnqueueTest.java | 2 +- .../usecases/BacklogNetworkCrossTalkTest.java | 2 +- .../BrokerQueueNetworkWithDisconnectTest.java | 2 +- ...ConcurrentProducerDurableConsumerTest.java | 2 +- .../ConcurrentProducerQueueConsumerTest.java | 2 +- .../usecases/JdbcDurableSubDupTest.java | 2 +- ...MessageGroupReconnectDistributionTest.java | 4 +- ...TempDestDemandSubscriptionCleanupTest.java | 2 +- 22 files changed, 59 insertions(+), 59 deletions(-) diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseTest.java index cf4929a551..422b5ffe44 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseTest.java @@ -43,7 +43,7 @@ public class DbRestartJDBCQueueMasterSlaveLeaseTest extends DbRestartJDBCQueueMa LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); ioExceptionHandler.setIgnoreSQLExceptions(false); ioExceptionHandler.setStopStartConnectors(false); - ioExceptionHandler.setResumeCheckSleepPeriod(500l); + ioExceptionHandler.setResumeCheckSleepPeriod(500L); brokerService.setIoExceptionHandler(ioExceptionHandler); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java index 91209379ad..d02085aed6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java @@ -67,7 +67,7 @@ public class QueuePurgeTest extends CombinationTestSupport { broker.setDataDirectoryFile(testDataDir); broker.setUseJmx(true); broker.setDeleteAllMessagesOnStartup(true); - broker.getSystemUsage().getMemoryUsage().setLimit(1024l*1024*64); + broker.getSystemUsage().getMemoryUsage().setLimit(1024L*1024*64); KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter(); persistenceAdapter.setDirectory(new File(testDataDir, "kahadb")); broker.setPersistenceAdapter(persistenceAdapter); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorOrderTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorOrderTest.java index f8fab10a13..e5431c065d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorOrderTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorOrderTest.java @@ -106,7 +106,7 @@ public class StoreQueueCursorOrderTest { @Override public void run() { } - }, 2l) {}; + }, 2L) {}; msg.getMessageId().setFutureOrSequenceLong(future); underTest.addMessageLast(msg); @@ -116,12 +116,12 @@ public class StoreQueueCursorOrderTest { msg = getMessage(1); messages[0] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(1l); + msg.getMessageId().setFutureOrSequenceLong(1L); underTest.addMessageLast(msg); assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); - assertEquals("setBatch unset", 0l, queueMessageStore.batch.get()); + assertEquals("setBatch unset", 0L, queueMessageStore.batch.get()); int dequeueCount = 0; @@ -171,9 +171,9 @@ public class StoreQueueCursorOrderTest { FutureTask future = new FutureTask(new Runnable() { @Override public void run() { - msgRef.getMessageId().setFutureOrSequenceLong(1l); + msgRef.getMessageId().setFutureOrSequenceLong(1L); } - }, 1l) {}; + }, 1L) {}; msg.getMessageId().setFutureOrSequenceLong(future); Executors.newSingleThreadExecutor().submit(future); underTest.addMessageLast(msg); @@ -184,12 +184,12 @@ public class StoreQueueCursorOrderTest { msg = getMessage(1); messages[0] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(1l); + msg.getMessageId().setFutureOrSequenceLong(1L); underTest.addMessageLast(msg); assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); - assertEquals("setBatch unset", 0l, queueMessageStore.batch.get()); + assertEquals("setBatch unset", 0L, queueMessageStore.batch.get()); int dequeueCount = 0; @@ -239,9 +239,9 @@ public class StoreQueueCursorOrderTest { FutureTask future = new FutureTask(new Runnable() { @Override public void run() { - msgRef.getMessageId().setFutureOrSequenceLong(0l); + msgRef.getMessageId().setFutureOrSequenceLong(0L); } - }, 0l) {}; + }, 0L) {}; msg.getMessageId().setFutureOrSequenceLong(future); Executors.newSingleThreadExecutor().submit(future); underTest.addMessageLast(msg); @@ -257,16 +257,16 @@ public class StoreQueueCursorOrderTest { FutureTask future2 = new FutureTask(new Runnable() { @Override public void run() { - msgRe2f.getMessageId().setFutureOrSequenceLong(1l); + msgRe2f.getMessageId().setFutureOrSequenceLong(1L); } - }, 1l) {}; + }, 1L) {}; msg.getMessageId().setFutureOrSequenceLong(future2); Executors.newSingleThreadExecutor().submit(future2); underTest.addMessageLast(msg); assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); - assertEquals("setBatch set", 1l, queueMessageStore.batch.get()); + assertEquals("setBatch set", 1L, queueMessageStore.batch.get()); int dequeueCount = 0; @@ -316,9 +316,9 @@ public class StoreQueueCursorOrderTest { FutureTask future0 = new FutureTask(new Runnable() { @Override public void run() { - msgRef.getMessageId().setFutureOrSequenceLong(0l); + msgRef.getMessageId().setFutureOrSequenceLong(0L); } - }, 0l) {}; + }, 0L) {}; msg.getMessageId().setFutureOrSequenceLong(future0); underTest.addMessageLast(msg); Executors.newSingleThreadExecutor().submit(future0); @@ -332,9 +332,9 @@ public class StoreQueueCursorOrderTest { FutureTask future1 = new FutureTask(new Runnable() { @Override public void run() { - msgRef1.getMessageId().setFutureOrSequenceLong(3l); + msgRef1.getMessageId().setFutureOrSequenceLong(3L); } - }, 3l) {}; + }, 3L) {}; msg.getMessageId().setFutureOrSequenceLong(future1); underTest.addMessageLast(msg); @@ -342,7 +342,7 @@ public class StoreQueueCursorOrderTest { msg = getMessage(2); messages[1] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(1l); + msg.getMessageId().setFutureOrSequenceLong(1L); underTest.addMessageLast(msg); assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled()); @@ -354,12 +354,12 @@ public class StoreQueueCursorOrderTest { msg = getMessage(3); messages[2] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(3l); + msg.getMessageId().setFutureOrSequenceLong(3L); underTest.addMessageLast(msg); assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); - assertEquals("setBatch set", 2l, queueMessageStore.batch.get()); + assertEquals("setBatch set", 2L, queueMessageStore.batch.get()); int dequeueCount = 0; @@ -405,13 +405,13 @@ public class StoreQueueCursorOrderTest { ActiveMQTextMessage msg = getMessage(0); messages[0] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(0l); + msg.getMessageId().setFutureOrSequenceLong(0L); underTest.addMessageLast(msg); msg = getMessage(1); messages[1] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(1l); + msg.getMessageId().setFutureOrSequenceLong(1L); underTest.addMessageLast(msg); assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled()); @@ -419,12 +419,12 @@ public class StoreQueueCursorOrderTest { msg = getMessage(2); messages[2] = msg; msg.setMemoryUsage(systemUsage.getMemoryUsage()); - msg.getMessageId().setFutureOrSequenceLong(2l); + msg.getMessageId().setFutureOrSequenceLong(2L); underTest.addMessageLast(msg); assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); - assertEquals("setBatch set", 2l, queueMessageStore.batch.get()); + assertEquals("setBatch set", 2L, queueMessageStore.batch.get()); int dequeueCount = 0; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java index 0ce584d1e5..41b0f0dc02 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JmsSchedulerTest.java @@ -260,7 +260,7 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport { // wait for the producer to block, which should happen immediately, and also wait long // enough for the delay to elapse. We should see no deliveries as the send should block // on the first message. - Thread.sleep(10000l); + Thread.sleep(10000L); assertEquals(100, latch.getCount()); @@ -268,7 +268,7 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport { broker.getSystemUsage().getJobSchedulerUsage().setLimit(1024 * 1024 * 33); // Wait long enough that the messages are enqueued and the delivery delay has elapsed. - Thread.sleep(10000l); + Thread.sleep(10000L); // Make sure we sent all the messages we expected to send Wait.waitFor(new Wait.Condition() { @@ -276,12 +276,12 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport { public boolean isSatisified() throws Exception { return producer.getSentCount() == producer.getMessageCount(); } - }, 20000l); + }, 20000L); assertEquals("Producer didn't send all messages", producer.getMessageCount(), producer.getSentCount()); // Make sure we got all the messages we expected to get - latch.await(20000l, TimeUnit.MILLISECONDS); + latch.await(20000L, TimeUnit.MILLISECONDS); assertEquals("Consumer did not receive all messages.", 0, latch.getCount()); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java index 369385c8b3..08be5db1e6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java @@ -157,7 +157,7 @@ public class AMQ2314Test extends CombinationTestSupport { broker.setUseJmx(true); broker.setAdvisorySupport(false); broker.setDeleteAllMessagesOnStartup(true); - broker.getSystemUsage().getMemoryUsage().setLimit(1024l*1024*64); + broker.getSystemUsage().getMemoryUsage().setLimit(1024L*1024*64); broker.addConnector("tcp://localhost:0").setName("Default"); broker.start(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java index 21c389f390..7c549b4ba0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java @@ -101,14 +101,14 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport { addNetworkConnector(broker); } broker.setSchedulePeriodForDestinationPurge(0); - broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024l); + broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024L); PolicyMap policyMap = new PolicyMap(); PolicyEntry policyEntry = new PolicyEntry(); policyEntry.setExpireMessagesPeriod(0); policyEntry.setQueuePrefetch(1000); - policyEntry.setMemoryLimit(2 * 1024 * 1024l); + policyEntry.setMemoryLimit(2 * 1024 * 1024L); policyEntry.setProducerFlowControl(false); policyEntry.setEnableAudit(true); policyEntry.setUseCache(true); @@ -117,7 +117,7 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport { PolicyEntry inPolicyEntry = new PolicyEntry(); inPolicyEntry.setExpireMessagesPeriod(0); inPolicyEntry.setQueuePrefetch(1000); - inPolicyEntry.setMemoryLimit(5 * 1024 * 1024l); + inPolicyEntry.setMemoryLimit(5 * 1024 * 1024L); inPolicyEntry.setProducerFlowControl(true); inPolicyEntry.setEnableAudit(true); inPolicyEntry.setUseCache(true); @@ -252,7 +252,7 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport { } return true; } - }, 1000 * 60 * 1000l, 20*1000)); + }, 1000 * 60 * 1000L, 20*1000)); assertTrue("No exceptions:" + exceptions, exceptions.isEmpty()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java index c2cf53ae2a..8e4e4b7a96 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java @@ -98,7 +98,7 @@ public class AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest extends Jms PolicyEntry policyEntry = new PolicyEntry(); policyEntry.setExpireMessagesPeriod(0); policyEntry.setQueuePrefetch(1000); - policyEntry.setMemoryLimit(1024 * 1024l); + policyEntry.setMemoryLimit(1024 * 1024L); policyEntry.setOptimizedDispatch(false); policyEntry.setProducerFlowControl(false); policyEntry.setEnableAudit(true); @@ -171,7 +171,7 @@ public class AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest extends Jms } return true; } - }, 1000 * 60 * 1000l)); + }, 1000 * 60 * 1000L)); assertTrue("No exceptions:" + exceptions, exceptions.isEmpty()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java index b9246fbe00..1e0ccb9127 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java @@ -101,9 +101,9 @@ public class AMQ4636Test { JDBCPersistenceAdapter jdbc = new TestJDBCPersistenceAdapter(); jdbc.setDataSource(embeddedDataSource); - jdbc.setLockKeepAlivePeriod(1000l); + jdbc.setLockKeepAlivePeriod(1000L); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); - leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); + leaseDatabaseLocker.setLockAcquireSleepInterval(2000L); jdbc.setLocker(leaseDatabaseLocker); broker = new BrokerService(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java index 0d7f44bfee..ba7ee4dd4d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java @@ -227,7 +227,7 @@ public class AMQ5266SingleDestTest { } // verify empty dlq - assertEquals("No pending messages", 0l, ((RegionBroker) brokerService.getRegionBroker()).getDestinationStatistics().getMessages().getCount()); + assertEquals("No pending messages", 0L, ((RegionBroker) brokerService.getRegionBroker()).getDestinationStatistics().getMessages().getCount()); } public class ExportQueuePublisher { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java index 688d066d2a..ad6df7fc00 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java @@ -82,9 +82,9 @@ public class TrapMessageInJDBCStoreTest extends TestCase { jdbc.setCleanupPeriod(0); testTransactionContext = new TestTransactionContext(jdbc); - jdbc.setLockKeepAlivePeriod(1000l); + jdbc.setLockKeepAlivePeriod(1000L); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); - leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); + leaseDatabaseLocker.setLockAcquireSleepInterval(2000L); jdbc.setLocker(leaseDatabaseLocker); broker.setPersistenceAdapter(jdbc); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java index 9e0f468416..e042217ced 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java @@ -979,7 +979,7 @@ public class ActiveMQStreamMessageTest extends TestCase { message.writeObject(new Byte((byte) 2)); message.writeObject(new Short((short) 2)); message.writeObject(new Integer(2)); - message.writeObject(new Long(2l)); + message.writeObject(new Long(2L)); message.writeObject(new Float(2.0f)); message.writeObject(new Double(2.0d)); }catch(Exception e) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java index df10d73e89..2502110a6e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java @@ -71,17 +71,17 @@ public class JDBCIOExceptionHandlerTest extends TestCase { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); jdbc.setDataSource(dataSource); - jdbc.setLockKeepAlivePeriod(1000l); + jdbc.setLockKeepAlivePeriod(1000L); if (leaseLocker) { LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); leaseDatabaseLocker.setHandleStartException(true); - leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); + leaseDatabaseLocker.setLockAcquireSleepInterval(2000L); jdbc.setLocker(leaseDatabaseLocker); } broker.setPersistenceAdapter(jdbc); LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); - ioExceptionHandler.setResumeCheckSleepPeriod(1000l); + ioExceptionHandler.setResumeCheckSleepPeriod(1000L); ioExceptionHandler.setStopStartConnectors(startStopConnectors); broker.setIoExceptionHandler(ioExceptionHandler); String connectionUri = broker.addConnector(TRANSPORT_URL).getPublishableConnectString(); @@ -129,18 +129,18 @@ public class JDBCIOExceptionHandlerTest extends TestCase { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); jdbc.setDataSource(dataSource); - jdbc.setLockKeepAlivePeriod(1000l); + jdbc.setLockKeepAlivePeriod(1000L); if (lease) { LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); leaseDatabaseLocker.setHandleStartException(true); - leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); + leaseDatabaseLocker.setLockAcquireSleepInterval(2000L); jdbc.setLocker(leaseDatabaseLocker); } broker.setPersistenceAdapter(jdbc); LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); - ioExceptionHandler.setResumeCheckSleepPeriod(1000l); + ioExceptionHandler.setResumeCheckSleepPeriod(1000L); ioExceptionHandler.setStopStartConnectors(false); broker.setIoExceptionHandler(ioExceptionHandler); slave.set(broker); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java index 34796a4a3b..2399738ea9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCMessagePriorityTest.java @@ -150,7 +150,7 @@ public class JDBCMessagePriorityTest extends MessagePriorityTest { for (int priority = 0; priority < maxPriority; priority++) { producers.add(new ProducerThread(topic, MSG_NUM, priority)); messageCounts[priority] = new AtomicInteger(0); - messageIds[priority] = 1l; + messageIds[priority] = 1L; } for (ProducerThread producer : producers) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java index 774d172bb1..6042ae6e53 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java @@ -188,7 +188,7 @@ public class LeaseDatabaseLockerTest { statement = connection.prepareStatement(jdbc.getStatements().getLeaseUpdateStatement()); statement.setString(1, null); - statement.setLong(2, 0l); + statement.setLong(2, 0L); statement.setString(3, fakeId); assertEquals("we released " + fakeId, 1, statement.executeUpdate()); LOG.info("released " + fakeId); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBFastEnqueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBFastEnqueueTest.java index 15abe3d764..57530da7e2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBFastEnqueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBFastEnqueueTest.java @@ -189,7 +189,7 @@ public class KahaDBFastEnqueueTest { MessageProducer producer = session.createProducer(destination); Long start = System.currentTimeMillis(); - long i = 0l; + long i = 0L; while ( (i=count.getAndDecrement()) > 0) { Message message = null; if (useBytesMessage) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java index 3e9b91362a..b56c5b0134 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java @@ -69,7 +69,7 @@ public class BacklogNetworkCrossTalkTest extends JmsMultipleBrokersTestSupport { MessageConsumer clientB = createConsumer("B", destA); - final long maxWait = 5 * 60 * 1000l; + final long maxWait = 5 * 60 * 1000L; MessageIdList listA = getConsumerMessages("A", clientA); listA.setMaximumDuration(maxWait); listA.waitForMessagesToArrive(numMessages); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java index 0b8de2905a..e32a1bc80c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BrokerQueueNetworkWithDisconnectTest.java @@ -88,7 +88,7 @@ public class BrokerQueueNetworkWithDisconnectTest extends JmsMultipleBrokersTest @SuppressWarnings("unchecked") public void testNoStuckConnectionsWithTransportDisconnect() throws Exception { - inactiveDuration=60000l; + inactiveDuration=60000L; useDuplexNetworkBridge = true; bridgeBrokers(SPOKE, HUB); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java index a5233ee14b..e1035a6350 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java @@ -405,7 +405,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { final int batchSize = 1000; CountDownLatch firstReceiptLatch = new CountDownLatch(1); long mark = System.currentTimeMillis(); - long firstReceipt = 0l; + long firstReceipt = 0L; long receiptAccumulator = 0; long batchReceiptAccumulator = 0; long maxReceiptTime = 0; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java index e9e3b54dea..34807c64f2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java @@ -362,7 +362,7 @@ public class ConcurrentProducerQueueConsumerTest extends TestSupport final CountDownLatch firstReceiptLatch = new CountDownLatch(1); long mark = System.currentTimeMillis(); - long firstReceipt = 0l; + long firstReceipt = 0L; long receiptAccumulator = 0; long batchReceiptAccumulator = 0; long maxReceiptTime = 0; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java index 0cb2648bf2..1b3be069c2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JdbcDurableSubDupTest.java @@ -239,7 +239,7 @@ public class JdbcDurableSubDupTest { ActiveMQConnectionFactory factory; MessageProducer messageProducer; - long timeToLive = 0l; + long timeToLive = 0L; TextMessage message = null; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupReconnectDistributionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupReconnectDistributionTest.java index da2f367c48..bbc3a7aec5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupReconnectDistributionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupReconnectDistributionTest.java @@ -122,8 +122,8 @@ public class MessageGroupReconnectDistributionTest { final ArrayList batchCounters = new ArrayList(numConsumers); for (int i = 0; i < numConsumers; i++) { - consumedCounters.add(new AtomicLong(0l)); - batchCounters.add(new AtomicLong(0l)); + consumedCounters.add(new AtomicLong(0L)); + batchCounters.add(new AtomicLong(0L)); final int id = i; executorService.submit(new Runnable() { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempDestDemandSubscriptionCleanupTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempDestDemandSubscriptionCleanupTest.java index 08435df1b2..aa1b89b35d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempDestDemandSubscriptionCleanupTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerTempDestDemandSubscriptionCleanupTest.java @@ -122,7 +122,7 @@ public class ThreeBrokerTempDestDemandSubscriptionCleanupTest extends JmsMultipl threadService.submit(tester); threadService.shutdown(); - assertTrue("executor done on time", threadService.awaitTermination(30l, TimeUnit.SECONDS)); + assertTrue("executor done on time", threadService.awaitTermination(30L, TimeUnit.SECONDS)); // for the real test... we should not have any subscriptions left on broker C for the temp dests BrokerItem brokerC = brokers.get(BROKER_C);