Skip to content

Commit b44195c

Browse files
committed
Fix ordered testing flapper - seems to be related to slow machines
1 parent 70b9be3 commit b44195c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/io/nats/client/impl/SimplificationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ public void testReconnectOverOrdered() throws Exception {
17281728

17291729
ConsumeOptions consumeOptions = ConsumeOptions.builder()
17301730
.batchSize(100) // small batch size means more round trips
1731-
.expiresIn(2000) // idle heartbeat is half of this, alarm time is 3 * ihb
1731+
.expiresIn(1500) // idle heartbeat is half of this, alarm time is 3 * ihb
17321732
.build();
17331733

17341734
OrderedConsumerConfiguration ocConfig = new OrderedConsumerConfiguration().filterSubjects(subject);
@@ -1749,7 +1749,7 @@ public void testReconnectOverOrdered() throws Exception {
17491749
// reconnect and get some more messages
17501750
try (NatsTestServer ignored = new NatsTestServer(port, false, true)) {
17511751
standardConnectionWait(nc);
1752-
sleep(5000); // long enough to get messages and for the hb alarm to have tripped
1752+
sleep(6000); // long enough to get messages and for the hb alarm to have tripped
17531753
}
17541754
validateConsumerNameForOrdered(orderedConsumerContext, mcon, null);
17551755
assertNotEquals(firstConsumerName, orderedConsumerContext.getConsumerName());
@@ -1759,10 +1759,10 @@ public void testReconnectOverOrdered() throws Exception {
17591759
assertTrue(count2 > count1);
17601760
assertEquals(count2, nextExpectedSequence.get());
17611761

1762-
sleep(4000); // enough delay before reconnect to trip hb alarm again
1762+
sleep(6000); // enough delay before reconnect to trip hb alarm again
17631763
try (NatsTestServer ignored = new NatsTestServer(port, false, true)) {
17641764
standardConnectionWait(nc);
1765-
sleep(4000); // long enough to get messages and for the hb alarm to have tripped
1765+
sleep(6000); // long enough to get messages and for the hb alarm to have tripped
17661766

17671767
try {
17681768
nc.jetStreamManagement().deleteStream(stream); // it was a file stream clean it up

0 commit comments

Comments
 (0)