@@ -1945,14 +1945,6 @@ public void testOrderingAfterReconnects() throws Exception {
19451945 CountDownLatch messagesReceived = new CountDownLatch (totalMessages );
19461946 MessageListener <Integer > messageHandler = (consumer , msg ) -> {
19471947 synchronized (this ) {
1948- // sleep for a random time with probability
1949- if (random .nextInt (100 ) < 15 ) {
1950- try {
1951- Thread .sleep (random .nextInt (50 ) + 1 );
1952- } catch (InterruptedException e ) {
1953- Thread .currentThread ().interrupt ();
1954- }
1955- }
19561948 consumer .acknowledgeAsync (msg );
19571949 String key = msg .getKey ();
19581950 MessageIdAdv msgId = (MessageIdAdv ) msg .getMessageId ();
@@ -2051,7 +2043,6 @@ public void testOrderingAfterReconnects() throws Exception {
20512043 .subscriptionType (SubscriptionType .Key_Shared )
20522044 .receiverQueueSize (10 )
20532045 .messageListener (messageHandler )
2054- .startPaused (true )
20552046 .subscribe ();
20562047 // close and reconnect c1
20572048 c1 .close ();
@@ -2063,7 +2054,6 @@ public void testOrderingAfterReconnects() throws Exception {
20632054 .subscriptionType (SubscriptionType .Key_Shared )
20642055 .receiverQueueSize (10 )
20652056 .messageListener (messageHandler )
2066- .startPaused (true )
20672057 .subscribe ();
20682058 // close and reconnect c3
20692059 c3 .close ();
@@ -2075,7 +2065,6 @@ public void testOrderingAfterReconnects() throws Exception {
20752065 .subscriptionType (SubscriptionType .Key_Shared )
20762066 .receiverQueueSize (10 )
20772067 .messageListener (messageHandler )
2078- .startPaused (true )
20792068 .subscribe ();
20802069
20812070 System .out .println ("readPosition: " + sub .getCursor ().getReadPosition () + " numberOfMessagesInReplay: "
@@ -2095,9 +2084,6 @@ public void testOrderingAfterReconnects() throws Exception {
20952084 }
20962085
20972086 // consume the messages
2098- c1 .resume ();
2099- c2 .resume ();
2100- c3 .resume ();
21012087 messagesReceived .await (30 , TimeUnit .SECONDS );
21022088 try {
21032089 assertEquals (remainingMessageValues , Collections .emptySet ());
0 commit comments