Make a few tests more robust

This commit is contained in:
jbertram 2016-05-19 11:49:51 -05:00
parent dfdb35a2bd
commit 76f6c9c3bd
8 changed files with 31 additions and 5 deletions

View File

@ -0,0 +1,8 @@
<!--
This value was determined through a calculation.
Your system could perform ${writesPerMillisecond} writes per millisecond
on the current journal configuration.
That translates as a sync write every ${nanoseconds} nanoseconds
-->
<journal-buffer-timeout>${nanoseconds}</journal-buffer-timeout>

View File

@ -0,0 +1,2 @@
<!-- HornetQ Compatibility Acceptor. Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
<acceptor name="hornetq">tcp://${host}:${hq.port}?protocols=HORNETQ,STOMP</acceptor>

View File

@ -0,0 +1,8 @@
<!--
This value was determined through a calculation.
Your system could perform ${writesPerMillisecond} writes per millisecond
on the current journal configuration.
That translates as a sync write every ${nanoseconds} nanoseconds
-->
<journal-buffer-timeout>${nanoseconds}</journal-buffer-timeout>

View File

@ -0,0 +1,8 @@
<!--
This value was determined through a calculation.
Your system could perform ${writesPerMillisecond} writes per millisecond
on the current journal configuration.
That translates as a sync write every ${nanoseconds} nanoseconds
-->
<journal-buffer-timeout>${nanoseconds}</journal-buffer-timeout>

View File

@ -591,7 +591,7 @@ public abstract class ActiveMQTestBase extends Assert {
break;
}
}
} while (i++ <= 30 && hasValue);
} while (i++ <= 50 && hasValue);
for (WeakReference<?> ref : references) {
Assert.assertNull(ref.get());

View File

@ -332,7 +332,7 @@ public class FailoverTest extends FailoverTestBase {
// https://issues.jboss.org/browse/HORNETQ-685
@Test
public void testTimeoutOnFailoverTransactionCommit() throws Exception {
locator.setCallTimeout(2000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
locator.setCallTimeout(5000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
((InVMNodeManager) nodeManager).failoverPause = 5000L;

View File

@ -900,7 +900,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
ClientProducer producer1 = session.createProducer(random1);
ClientProducer producer2 = session.createProducer(random2);
ClientMessage message = session.createMessage(false);
ClientMessage message = session.createMessage(true);
producer1.send(message);
producer2.send(message);

View File

@ -347,12 +347,12 @@ public class ScaleDown3NodeTest extends ClusterTestBase {
Assert.assertEquals(TEST_SIZE * 2, messageCount);
for (int i = 0; i < TEST_SIZE; i++) {
ClientMessage clientMessage = consumers[0].getConsumer().receive(250);
ClientMessage clientMessage = consumers[0].getConsumer().receive(1000);
Assert.assertNotNull(clientMessage);
IntegrationTestLogger.LOGGER.info("Received: " + clientMessage);
clientMessage.acknowledge();
clientMessage = consumers[1].getConsumer().receive(250);
clientMessage = consumers[1].getConsumer().receive(1000);
Assert.assertNotNull(clientMessage);
IntegrationTestLogger.LOGGER.info("Received: " + clientMessage);
clientMessage.acknowledge();