File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/test/java/com/rabbitmq/client/amqp/impl Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ void publishConsumeQuorumQueueWhenLeaderChanges() {
299299 }
300300
301301 @ Test
302- void consumeFromQuorumQueueWhenLeaderIsPaused () throws InterruptedException {
302+ void consumeFromQuorumQueueWhenLeaderIsPaused () {
303303 management .queue (q ).type (QUORUM ).declare ();
304304 Management .QueueInfo queueInfo = queueInfo ();
305305 String initialLeader = queueInfo .leader ();
@@ -352,14 +352,14 @@ void consumeFromQuorumQueueWhenLeaderIsPaused() throws InterruptedException {
352352 consumeSync .reset ();
353353
354354 waitAtMost (
355+ ofSeconds (20 ),
355356 () -> initialFollowers .contains (mgmt .queueInfo (q ).leader ()),
356357 () ->
357358 "Current leader is not in initial followers, initial followers "
358359 + initialFollowers
359360 + ", "
360361 + "queue info "
361362 + mgmt .queueInfo (q ));
362- assertThat (initialFollowers ).contains (mgmt .queueInfo (q ).leader ());
363363
364364 Cli .unpauseNode (initialLeader );
365365 nodePaused = false ;
@@ -371,7 +371,15 @@ void consumeFromQuorumQueueWhenLeaderIsPaused() throws InterruptedException {
371371 assertThat (consumeSync ).completes ();
372372 assertThat (messageIds ).containsExactlyInAnyOrder (1L , 2L , 3L );
373373
374- waitAtMost (() -> initialFollowers .contains (mgmt .queueInfo (q ).leader ()));
374+ waitAtMost (
375+ ofSeconds (20 ),
376+ () -> initialFollowers .contains (mgmt .queueInfo (q ).leader ()),
377+ () ->
378+ "Current leader is not in initial followers, initial followers "
379+ + initialFollowers
380+ + ", "
381+ + "queue info "
382+ + mgmt .queueInfo (q ));
375383 } finally {
376384 if (nodePaused ) {
377385 Cli .unpauseNode (initialLeader );
You can’t perform that action at this time.
0 commit comments