Skip to content

Commit

Permalink
NO-JIRA fix on JMSBridgeTestBase
Browse files Browse the repository at this point in the history
(cherry picked from commit d6ffa8b)
  • Loading branch information
clebertsuconic committed Nov 14, 2018
1 parent 566ecbb commit 6f62113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -459,7 +459,7 @@ protected void checkAllMessageReceivedInOrder(final ConnectionFactory cf,
// Consume the messages

for (int i = 0; i < numMessages; i++) {
Message tm = cons.receive(30000);
Message tm = cons.receive(3000);

Assert.assertNotNull(tm);

Expand Down Expand Up @@ -517,7 +517,9 @@ protected void removeAllMessages(final String queueName, final int index) throws
managementService = server1.getManagementService();
}
QueueControl queueControl = (QueueControl) managementService.getResource("queue." + queueName);
queueControl.removeMessages(null);
if (queueControl != null) {
queueControl.removeMessages(null);
}
}

protected TransactionManager newTransactionManager() {
Expand Down
Expand Up @@ -1166,7 +1166,7 @@ private void propertiesPreserved(final boolean persistent, final boolean message

Assert.assertEquals(0, tm.getJMSExpiration());

m = cons.receive(5000);
m = cons.receive(500);

Assert.assertNull(m);

Expand Down Expand Up @@ -1617,7 +1617,7 @@ private void testNoMaxBatchTimeSameServer(final QualityOfServiceMode qosMode,
try {
final int NUM_MESSAGES = 10;

bridge = new JMSBridgeImpl(factInUse0, factInUse0, sourceQueueFactory, localTargetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, NUM_MESSAGES, -1, null, null, false).setBridgeName("test-bridge");
bridge = new JMSBridgeImpl(factInUse0, factInUse0, sourceQueueFactory, localTargetQueueFactory, null, null, null, null, null, 500, 10, qosMode, NUM_MESSAGES, -1, null, null, false).setBridgeName("test-bridge");

bridge.start();

Expand Down

0 comments on commit 6f62113

Please sign in to comment.