Skip to content

Commit

Permalink
Don't start paused, remove delays
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Sep 13, 2024
1 parent 0e608c9 commit ca41a88
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1945,14 +1945,6 @@ public void testOrderingAfterReconnects() throws Exception {
CountDownLatch messagesReceived = new CountDownLatch(totalMessages);
MessageListener<Integer> messageHandler = (consumer, msg) -> {
synchronized (this) {
// sleep for a random time with probability
if (random.nextInt(100) < 15) {
try {
Thread.sleep(random.nextInt(50) + 1);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
consumer.acknowledgeAsync(msg);
String key = msg.getKey();
MessageIdAdv msgId = (MessageIdAdv) msg.getMessageId();
Expand Down Expand Up @@ -2051,7 +2043,6 @@ public void testOrderingAfterReconnects() throws Exception {
.subscriptionType(SubscriptionType.Key_Shared)
.receiverQueueSize(10)
.messageListener(messageHandler)
.startPaused(true)
.subscribe();
// close and reconnect c1
c1.close();
Expand All @@ -2063,7 +2054,6 @@ public void testOrderingAfterReconnects() throws Exception {
.subscriptionType(SubscriptionType.Key_Shared)
.receiverQueueSize(10)
.messageListener(messageHandler)
.startPaused(true)
.subscribe();
// close and reconnect c3
c3.close();
Expand All @@ -2075,7 +2065,6 @@ public void testOrderingAfterReconnects() throws Exception {
.subscriptionType(SubscriptionType.Key_Shared)
.receiverQueueSize(10)
.messageListener(messageHandler)
.startPaused(true)
.subscribe();

System.out.println("readPosition: " + sub.getCursor().getReadPosition() + " numberOfMessagesInReplay: "
Expand All @@ -2095,9 +2084,6 @@ public void testOrderingAfterReconnects() throws Exception {
}

// consume the messages
c1.resume();
c2.resume();
c3.resume();
messagesReceived.await(30, TimeUnit.SECONDS);
try {
assertEquals(remainingMessageValues, Collections.emptySet());
Expand Down

0 comments on commit ca41a88

Please sign in to comment.