|
13 | 13 | -include_lib("common_test/include/ct.hrl"). |
14 | 14 | -include_lib("amqp_client/include/amqp_client.hrl"). |
15 | 15 | -include_lib("eunit/include/eunit.hrl"). |
| 16 | +-include_lib("rabbitmq_ct_helpers/include/rabbit_assert.hrl"). |
| 17 | + |
| 18 | +-define(DEFAULT_WAIT, 1000). |
| 19 | +-define(DEFAULT_INTERVAL, 100). |
16 | 20 |
|
17 | 21 | all() -> |
18 | 22 | [ |
@@ -231,7 +235,7 @@ test0(Config, MakeMethod, MakeMsg, DeclareArgs, [Q1, Q2, Q3, Q4] = Queues, Itera |
231 | 235 | MakeMethod(CHX), |
232 | 236 | MakeMsg()) || _ <- lists:duplicate(IterationCount, const)], |
233 | 237 | amqp_channel:wait_for_confirms(Chan, 300), |
234 | | - timer:sleep(500), |
| 238 | + timer:sleep(1000), |
235 | 239 |
|
236 | 240 | Counts = |
237 | 241 | [begin |
@@ -431,7 +435,7 @@ test_hash_ring_updates_when_exclusive_queues_are_deleted_due_to_connection_closu |
431 | 435 |
|
432 | 436 | ct:pal("all hash ring rows after connection closure: ~p", [hash_ring_rows(Config)]), |
433 | 437 |
|
434 | | - ?assertEqual(0, count_buckets_of_exchange(Config, X)), |
| 438 | + ?awaitMatch(0, count_buckets_of_exchange(Config, X), ?DEFAULT_WAIT, ?DEFAULT_INTERVAL), |
435 | 439 | clean_up_test_topology(Config, X, []), |
436 | 440 | ok. |
437 | 441 |
|
@@ -488,7 +492,7 @@ test_hash_ring_updates_when_exclusive_queues_are_deleted_due_to_connection_closu |
488 | 492 |
|
489 | 493 | ct:pal("all hash ring rows after connection closure (~p): ~p", [XAsList, hash_ring_rows(Config)]), |
490 | 494 |
|
491 | | - ?assertEqual(0, count_buckets_of_exchange(Config, X)), |
| 495 | + ?awaitMatch(0, count_buckets_of_exchange(Config, X), ?DEFAULT_WAIT, ?DEFAULT_INTERVAL), |
492 | 496 | clean_up_test_topology(Config, X, []), |
493 | 497 | ok. |
494 | 498 |
|
|
0 commit comments