ARTEMIS-127 Use L as suffix for long constants

This commit is contained in:
Thiago Kronig 2015-06-10 13:24:37 -03:00
parent aab34e5bd0
commit 64ecb9565d
22 changed files with 59 additions and 59 deletions

View File

@ -43,7 +43,7 @@ public class DbRestartJDBCQueueMasterSlaveLeaseTest extends DbRestartJDBCQueueMa
LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler();
ioExceptionHandler.setIgnoreSQLExceptions(false); ioExceptionHandler.setIgnoreSQLExceptions(false);
ioExceptionHandler.setStopStartConnectors(false); ioExceptionHandler.setStopStartConnectors(false);
ioExceptionHandler.setResumeCheckSleepPeriod(500l); ioExceptionHandler.setResumeCheckSleepPeriod(500L);
brokerService.setIoExceptionHandler(ioExceptionHandler); brokerService.setIoExceptionHandler(ioExceptionHandler);
} }

View File

@ -67,7 +67,7 @@ public class QueuePurgeTest extends CombinationTestSupport {
broker.setDataDirectoryFile(testDataDir); broker.setDataDirectoryFile(testDataDir);
broker.setUseJmx(true); broker.setUseJmx(true);
broker.setDeleteAllMessagesOnStartup(true); broker.setDeleteAllMessagesOnStartup(true);
broker.getSystemUsage().getMemoryUsage().setLimit(1024l*1024*64); broker.getSystemUsage().getMemoryUsage().setLimit(1024L*1024*64);
KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter(); KahaDBPersistenceAdapter persistenceAdapter = new KahaDBPersistenceAdapter();
persistenceAdapter.setDirectory(new File(testDataDir, "kahadb")); persistenceAdapter.setDirectory(new File(testDataDir, "kahadb"));
broker.setPersistenceAdapter(persistenceAdapter); broker.setPersistenceAdapter(persistenceAdapter);

View File

@ -106,7 +106,7 @@ public class StoreQueueCursorOrderTest {
@Override @Override
public void run() { public void run() {
} }
}, 2l) {}; }, 2L) {};
msg.getMessageId().setFutureOrSequenceLong(future); msg.getMessageId().setFutureOrSequenceLong(future);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
@ -116,12 +116,12 @@ public class StoreQueueCursorOrderTest {
msg = getMessage(1); msg = getMessage(1);
messages[0] = msg; messages[0] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(1l); msg.getMessageId().setFutureOrSequenceLong(1L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); 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; int dequeueCount = 0;
@ -171,9 +171,9 @@ public class StoreQueueCursorOrderTest {
FutureTask<Long> future = new FutureTask<Long>(new Runnable() { FutureTask<Long> future = new FutureTask<Long>(new Runnable() {
@Override @Override
public void run() { public void run() {
msgRef.getMessageId().setFutureOrSequenceLong(1l); msgRef.getMessageId().setFutureOrSequenceLong(1L);
} }
}, 1l) {}; }, 1L) {};
msg.getMessageId().setFutureOrSequenceLong(future); msg.getMessageId().setFutureOrSequenceLong(future);
Executors.newSingleThreadExecutor().submit(future); Executors.newSingleThreadExecutor().submit(future);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
@ -184,12 +184,12 @@ public class StoreQueueCursorOrderTest {
msg = getMessage(1); msg = getMessage(1);
messages[0] = msg; messages[0] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(1l); msg.getMessageId().setFutureOrSequenceLong(1L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); 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; int dequeueCount = 0;
@ -239,9 +239,9 @@ public class StoreQueueCursorOrderTest {
FutureTask<Long> future = new FutureTask<Long>(new Runnable() { FutureTask<Long> future = new FutureTask<Long>(new Runnable() {
@Override @Override
public void run() { public void run() {
msgRef.getMessageId().setFutureOrSequenceLong(0l); msgRef.getMessageId().setFutureOrSequenceLong(0L);
} }
}, 0l) {}; }, 0L) {};
msg.getMessageId().setFutureOrSequenceLong(future); msg.getMessageId().setFutureOrSequenceLong(future);
Executors.newSingleThreadExecutor().submit(future); Executors.newSingleThreadExecutor().submit(future);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
@ -257,16 +257,16 @@ public class StoreQueueCursorOrderTest {
FutureTask<Long> future2 = new FutureTask<Long>(new Runnable() { FutureTask<Long> future2 = new FutureTask<Long>(new Runnable() {
@Override @Override
public void run() { public void run() {
msgRe2f.getMessageId().setFutureOrSequenceLong(1l); msgRe2f.getMessageId().setFutureOrSequenceLong(1L);
} }
}, 1l) {}; }, 1L) {};
msg.getMessageId().setFutureOrSequenceLong(future2); msg.getMessageId().setFutureOrSequenceLong(future2);
Executors.newSingleThreadExecutor().submit(future2); Executors.newSingleThreadExecutor().submit(future2);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); 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; int dequeueCount = 0;
@ -316,9 +316,9 @@ public class StoreQueueCursorOrderTest {
FutureTask<Long> future0 = new FutureTask<Long>(new Runnable() { FutureTask<Long> future0 = new FutureTask<Long>(new Runnable() {
@Override @Override
public void run() { public void run() {
msgRef.getMessageId().setFutureOrSequenceLong(0l); msgRef.getMessageId().setFutureOrSequenceLong(0L);
} }
}, 0l) {}; }, 0L) {};
msg.getMessageId().setFutureOrSequenceLong(future0); msg.getMessageId().setFutureOrSequenceLong(future0);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
Executors.newSingleThreadExecutor().submit(future0); Executors.newSingleThreadExecutor().submit(future0);
@ -332,9 +332,9 @@ public class StoreQueueCursorOrderTest {
FutureTask<Long> future1 = new FutureTask<Long>(new Runnable() { FutureTask<Long> future1 = new FutureTask<Long>(new Runnable() {
@Override @Override
public void run() { public void run() {
msgRef1.getMessageId().setFutureOrSequenceLong(3l); msgRef1.getMessageId().setFutureOrSequenceLong(3L);
} }
}, 3l) {}; }, 3L) {};
msg.getMessageId().setFutureOrSequenceLong(future1); msg.getMessageId().setFutureOrSequenceLong(future1);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
@ -342,7 +342,7 @@ public class StoreQueueCursorOrderTest {
msg = getMessage(2); msg = getMessage(2);
messages[1] = msg; messages[1] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(1l); msg.getMessageId().setFutureOrSequenceLong(1L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled()); assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled());
@ -354,12 +354,12 @@ public class StoreQueueCursorOrderTest {
msg = getMessage(3); msg = getMessage(3);
messages[2] = msg; messages[2] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(3l); msg.getMessageId().setFutureOrSequenceLong(3L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); 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; int dequeueCount = 0;
@ -405,13 +405,13 @@ public class StoreQueueCursorOrderTest {
ActiveMQTextMessage msg = getMessage(0); ActiveMQTextMessage msg = getMessage(0);
messages[0] = msg; messages[0] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(0l); msg.getMessageId().setFutureOrSequenceLong(0L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
msg = getMessage(1); msg = getMessage(1);
messages[1] = msg; messages[1] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(1l); msg.getMessageId().setFutureOrSequenceLong(1L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled()); assertTrue("cache enabled", underTest.isUseCache() && underTest.isCacheEnabled());
@ -419,12 +419,12 @@ public class StoreQueueCursorOrderTest {
msg = getMessage(2); msg = getMessage(2);
messages[2] = msg; messages[2] = msg;
msg.setMemoryUsage(systemUsage.getMemoryUsage()); msg.setMemoryUsage(systemUsage.getMemoryUsage());
msg.getMessageId().setFutureOrSequenceLong(2l); msg.getMessageId().setFutureOrSequenceLong(2L);
underTest.addMessageLast(msg); underTest.addMessageLast(msg);
assertTrue("cache is disabled as limit reached", !underTest.isCacheEnabled()); 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; int dequeueCount = 0;

View File

@ -260,7 +260,7 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport {
// wait for the producer to block, which should happen immediately, and also wait long // 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 // enough for the delay to elapse. We should see no deliveries as the send should block
// on the first message. // on the first message.
Thread.sleep(10000l); Thread.sleep(10000L);
assertEquals(100, latch.getCount()); assertEquals(100, latch.getCount());
@ -268,7 +268,7 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport {
broker.getSystemUsage().getJobSchedulerUsage().setLimit(1024 * 1024 * 33); broker.getSystemUsage().getJobSchedulerUsage().setLimit(1024 * 1024 * 33);
// Wait long enough that the messages are enqueued and the delivery delay has elapsed. // 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 // Make sure we sent all the messages we expected to send
Wait.waitFor(new Wait.Condition() { Wait.waitFor(new Wait.Condition() {
@ -276,12 +276,12 @@ public class JmsSchedulerTest extends JobSchedulerTestSupport {
public boolean isSatisified() throws Exception { public boolean isSatisified() throws Exception {
return producer.getSentCount() == producer.getMessageCount(); return producer.getSentCount() == producer.getMessageCount();
} }
}, 20000l); }, 20000L);
assertEquals("Producer didn't send all messages", producer.getMessageCount(), producer.getSentCount()); assertEquals("Producer didn't send all messages", producer.getMessageCount(), producer.getSentCount());
// Make sure we got all the messages we expected to get // 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()); assertEquals("Consumer did not receive all messages.", 0, latch.getCount());
} }

View File

@ -157,7 +157,7 @@ public class AMQ2314Test extends CombinationTestSupport {
broker.setUseJmx(true); broker.setUseJmx(true);
broker.setAdvisorySupport(false); broker.setAdvisorySupport(false);
broker.setDeleteAllMessagesOnStartup(true); 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.addConnector("tcp://localhost:0").setName("Default");
broker.start(); broker.start();

View File

@ -101,14 +101,14 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport {
addNetworkConnector(broker); addNetworkConnector(broker);
} }
broker.setSchedulePeriodForDestinationPurge(0); broker.setSchedulePeriodForDestinationPurge(0);
broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024l); broker.getSystemUsage().getMemoryUsage().setLimit(256 * 1024 * 1024L);
PolicyMap policyMap = new PolicyMap(); PolicyMap policyMap = new PolicyMap();
PolicyEntry policyEntry = new PolicyEntry(); PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setExpireMessagesPeriod(0); policyEntry.setExpireMessagesPeriod(0);
policyEntry.setQueuePrefetch(1000); policyEntry.setQueuePrefetch(1000);
policyEntry.setMemoryLimit(2 * 1024 * 1024l); policyEntry.setMemoryLimit(2 * 1024 * 1024L);
policyEntry.setProducerFlowControl(false); policyEntry.setProducerFlowControl(false);
policyEntry.setEnableAudit(true); policyEntry.setEnableAudit(true);
policyEntry.setUseCache(true); policyEntry.setUseCache(true);
@ -117,7 +117,7 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport {
PolicyEntry inPolicyEntry = new PolicyEntry(); PolicyEntry inPolicyEntry = new PolicyEntry();
inPolicyEntry.setExpireMessagesPeriod(0); inPolicyEntry.setExpireMessagesPeriod(0);
inPolicyEntry.setQueuePrefetch(1000); inPolicyEntry.setQueuePrefetch(1000);
inPolicyEntry.setMemoryLimit(5 * 1024 * 1024l); inPolicyEntry.setMemoryLimit(5 * 1024 * 1024L);
inPolicyEntry.setProducerFlowControl(true); inPolicyEntry.setProducerFlowControl(true);
inPolicyEntry.setEnableAudit(true); inPolicyEntry.setEnableAudit(true);
inPolicyEntry.setUseCache(true); inPolicyEntry.setUseCache(true);
@ -252,7 +252,7 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport {
} }
return true; return true;
} }
}, 1000 * 60 * 1000l, 20*1000)); }, 1000 * 60 * 1000L, 20*1000));
assertTrue("No exceptions:" + exceptions, exceptions.isEmpty()); assertTrue("No exceptions:" + exceptions, exceptions.isEmpty());

View File

@ -98,7 +98,7 @@ public class AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest extends Jms
PolicyEntry policyEntry = new PolicyEntry(); PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setExpireMessagesPeriod(0); policyEntry.setExpireMessagesPeriod(0);
policyEntry.setQueuePrefetch(1000); policyEntry.setQueuePrefetch(1000);
policyEntry.setMemoryLimit(1024 * 1024l); policyEntry.setMemoryLimit(1024 * 1024L);
policyEntry.setOptimizedDispatch(false); policyEntry.setOptimizedDispatch(false);
policyEntry.setProducerFlowControl(false); policyEntry.setProducerFlowControl(false);
policyEntry.setEnableAudit(true); policyEntry.setEnableAudit(true);
@ -171,7 +171,7 @@ public class AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest extends Jms
} }
return true; return true;
} }
}, 1000 * 60 * 1000l)); }, 1000 * 60 * 1000L));
assertTrue("No exceptions:" + exceptions, exceptions.isEmpty()); assertTrue("No exceptions:" + exceptions, exceptions.isEmpty());

View File

@ -101,9 +101,9 @@ public class AMQ4636Test {
JDBCPersistenceAdapter jdbc = new TestJDBCPersistenceAdapter(); JDBCPersistenceAdapter jdbc = new TestJDBCPersistenceAdapter();
jdbc.setDataSource(embeddedDataSource); jdbc.setDataSource(embeddedDataSource);
jdbc.setLockKeepAlivePeriod(1000l); jdbc.setLockKeepAlivePeriod(1000L);
LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker();
leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); leaseDatabaseLocker.setLockAcquireSleepInterval(2000L);
jdbc.setLocker(leaseDatabaseLocker); jdbc.setLocker(leaseDatabaseLocker);
broker = new BrokerService(); broker = new BrokerService();

View File

@ -227,7 +227,7 @@ public class AMQ5266SingleDestTest {
} }
// verify empty dlq // 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 { public class ExportQueuePublisher {

View File

@ -82,9 +82,9 @@ public class TrapMessageInJDBCStoreTest extends TestCase {
jdbc.setCleanupPeriod(0); jdbc.setCleanupPeriod(0);
testTransactionContext = new TestTransactionContext(jdbc); testTransactionContext = new TestTransactionContext(jdbc);
jdbc.setLockKeepAlivePeriod(1000l); jdbc.setLockKeepAlivePeriod(1000L);
LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker();
leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); leaseDatabaseLocker.setLockAcquireSleepInterval(2000L);
jdbc.setLocker(leaseDatabaseLocker); jdbc.setLocker(leaseDatabaseLocker);
broker.setPersistenceAdapter(jdbc); broker.setPersistenceAdapter(jdbc);

View File

@ -979,7 +979,7 @@ public class ActiveMQStreamMessageTest extends TestCase {
message.writeObject(new Byte((byte) 2)); message.writeObject(new Byte((byte) 2));
message.writeObject(new Short((short) 2)); message.writeObject(new Short((short) 2));
message.writeObject(new Integer(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 Float(2.0f));
message.writeObject(new Double(2.0d)); message.writeObject(new Double(2.0d));
}catch(Exception e) { }catch(Exception e) {

View File

@ -71,17 +71,17 @@ public class JDBCIOExceptionHandlerTest extends TestCase {
JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
jdbc.setDataSource(dataSource); jdbc.setDataSource(dataSource);
jdbc.setLockKeepAlivePeriod(1000l); jdbc.setLockKeepAlivePeriod(1000L);
if (leaseLocker) { if (leaseLocker) {
LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker();
leaseDatabaseLocker.setHandleStartException(true); leaseDatabaseLocker.setHandleStartException(true);
leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); leaseDatabaseLocker.setLockAcquireSleepInterval(2000L);
jdbc.setLocker(leaseDatabaseLocker); jdbc.setLocker(leaseDatabaseLocker);
} }
broker.setPersistenceAdapter(jdbc); broker.setPersistenceAdapter(jdbc);
LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler();
ioExceptionHandler.setResumeCheckSleepPeriod(1000l); ioExceptionHandler.setResumeCheckSleepPeriod(1000L);
ioExceptionHandler.setStopStartConnectors(startStopConnectors); ioExceptionHandler.setStopStartConnectors(startStopConnectors);
broker.setIoExceptionHandler(ioExceptionHandler); broker.setIoExceptionHandler(ioExceptionHandler);
String connectionUri = broker.addConnector(TRANSPORT_URL).getPublishableConnectString(); String connectionUri = broker.addConnector(TRANSPORT_URL).getPublishableConnectString();
@ -129,18 +129,18 @@ public class JDBCIOExceptionHandlerTest extends TestCase {
JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
jdbc.setDataSource(dataSource); jdbc.setDataSource(dataSource);
jdbc.setLockKeepAlivePeriod(1000l); jdbc.setLockKeepAlivePeriod(1000L);
if (lease) { if (lease) {
LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker(); LeaseDatabaseLocker leaseDatabaseLocker = new LeaseDatabaseLocker();
leaseDatabaseLocker.setHandleStartException(true); leaseDatabaseLocker.setHandleStartException(true);
leaseDatabaseLocker.setLockAcquireSleepInterval(2000l); leaseDatabaseLocker.setLockAcquireSleepInterval(2000L);
jdbc.setLocker(leaseDatabaseLocker); jdbc.setLocker(leaseDatabaseLocker);
} }
broker.setPersistenceAdapter(jdbc); broker.setPersistenceAdapter(jdbc);
LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler(); LeaseLockerIOExceptionHandler ioExceptionHandler = new LeaseLockerIOExceptionHandler();
ioExceptionHandler.setResumeCheckSleepPeriod(1000l); ioExceptionHandler.setResumeCheckSleepPeriod(1000L);
ioExceptionHandler.setStopStartConnectors(false); ioExceptionHandler.setStopStartConnectors(false);
broker.setIoExceptionHandler(ioExceptionHandler); broker.setIoExceptionHandler(ioExceptionHandler);
slave.set(broker); slave.set(broker);

View File

@ -150,7 +150,7 @@ public class JDBCMessagePriorityTest extends MessagePriorityTest {
for (int priority = 0; priority < maxPriority; priority++) { for (int priority = 0; priority < maxPriority; priority++) {
producers.add(new ProducerThread(topic, MSG_NUM, priority)); producers.add(new ProducerThread(topic, MSG_NUM, priority));
messageCounts[priority] = new AtomicInteger(0); messageCounts[priority] = new AtomicInteger(0);
messageIds[priority] = 1l; messageIds[priority] = 1L;
} }
for (ProducerThread producer : producers) { for (ProducerThread producer : producers) {

View File

@ -188,7 +188,7 @@ public class LeaseDatabaseLockerTest {
statement = connection.prepareStatement(jdbc.getStatements().getLeaseUpdateStatement()); statement = connection.prepareStatement(jdbc.getStatements().getLeaseUpdateStatement());
statement.setString(1, null); statement.setString(1, null);
statement.setLong(2, 0l); statement.setLong(2, 0L);
statement.setString(3, fakeId); statement.setString(3, fakeId);
assertEquals("we released " + fakeId, 1, statement.executeUpdate()); assertEquals("we released " + fakeId, 1, statement.executeUpdate());
LOG.info("released " + fakeId); LOG.info("released " + fakeId);

View File

@ -189,7 +189,7 @@ public class KahaDBFastEnqueueTest {
MessageProducer producer = session.createProducer(destination); MessageProducer producer = session.createProducer(destination);
Long start = System.currentTimeMillis(); Long start = System.currentTimeMillis();
long i = 0l; long i = 0L;
while ( (i=count.getAndDecrement()) > 0) { while ( (i=count.getAndDecrement()) > 0) {
Message message = null; Message message = null;
if (useBytesMessage) { if (useBytesMessage) {

View File

@ -69,7 +69,7 @@ public class BacklogNetworkCrossTalkTest extends JmsMultipleBrokersTestSupport {
MessageConsumer clientB = createConsumer("B", destA); MessageConsumer clientB = createConsumer("B", destA);
final long maxWait = 5 * 60 * 1000l; final long maxWait = 5 * 60 * 1000L;
MessageIdList listA = getConsumerMessages("A", clientA); MessageIdList listA = getConsumerMessages("A", clientA);
listA.setMaximumDuration(maxWait); listA.setMaximumDuration(maxWait);
listA.waitForMessagesToArrive(numMessages); listA.waitForMessagesToArrive(numMessages);

View File

@ -88,7 +88,7 @@ public class BrokerQueueNetworkWithDisconnectTest extends JmsMultipleBrokersTest
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void testNoStuckConnectionsWithTransportDisconnect() throws Exception { public void testNoStuckConnectionsWithTransportDisconnect() throws Exception {
inactiveDuration=60000l; inactiveDuration=60000L;
useDuplexNetworkBridge = true; useDuplexNetworkBridge = true;
bridgeBrokers(SPOKE, HUB); bridgeBrokers(SPOKE, HUB);

View File

@ -405,7 +405,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport {
final int batchSize = 1000; final int batchSize = 1000;
CountDownLatch firstReceiptLatch = new CountDownLatch(1); CountDownLatch firstReceiptLatch = new CountDownLatch(1);
long mark = System.currentTimeMillis(); long mark = System.currentTimeMillis();
long firstReceipt = 0l; long firstReceipt = 0L;
long receiptAccumulator = 0; long receiptAccumulator = 0;
long batchReceiptAccumulator = 0; long batchReceiptAccumulator = 0;
long maxReceiptTime = 0; long maxReceiptTime = 0;

View File

@ -362,7 +362,7 @@ public class ConcurrentProducerQueueConsumerTest extends TestSupport
final CountDownLatch firstReceiptLatch = new CountDownLatch(1); final CountDownLatch firstReceiptLatch = new CountDownLatch(1);
long mark = System.currentTimeMillis(); long mark = System.currentTimeMillis();
long firstReceipt = 0l; long firstReceipt = 0L;
long receiptAccumulator = 0; long receiptAccumulator = 0;
long batchReceiptAccumulator = 0; long batchReceiptAccumulator = 0;
long maxReceiptTime = 0; long maxReceiptTime = 0;

View File

@ -239,7 +239,7 @@ public class JdbcDurableSubDupTest {
ActiveMQConnectionFactory factory; ActiveMQConnectionFactory factory;
MessageProducer messageProducer; MessageProducer messageProducer;
long timeToLive = 0l; long timeToLive = 0L;
TextMessage message = null; TextMessage message = null;

View File

@ -122,8 +122,8 @@ public class MessageGroupReconnectDistributionTest {
final ArrayList<AtomicLong> batchCounters = new ArrayList<AtomicLong>(numConsumers); final ArrayList<AtomicLong> batchCounters = new ArrayList<AtomicLong>(numConsumers);
for (int i = 0; i < numConsumers; i++) { for (int i = 0; i < numConsumers; i++) {
consumedCounters.add(new AtomicLong(0l)); consumedCounters.add(new AtomicLong(0L));
batchCounters.add(new AtomicLong(0l)); batchCounters.add(new AtomicLong(0L));
final int id = i; final int id = i;
executorService.submit(new Runnable() { executorService.submit(new Runnable() {

View File

@ -122,7 +122,7 @@ public class ThreeBrokerTempDestDemandSubscriptionCleanupTest extends JmsMultipl
threadService.submit(tester); threadService.submit(tester);
threadService.shutdown(); 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 // for the real test... we should not have any subscriptions left on broker C for the temp dests
BrokerItem brokerC = brokers.get(BROKER_C); BrokerItem brokerC = brokers.get(BROKER_C);