@@ -91,13 +91,15 @@ single_link_then_second_added(Config) ->
9191 with_ch (
9292 Config ,
9393 fun (Ch ) ->
94- timer :sleep (3000 ),
95- [_L1 ] = rabbit_ct_broker_helpers :rpc (Config , 0 ,
96- rabbit_federation_status , status , []),
94+ rabbit_ct_helpers :eventually (
95+ ? _assertMatch ([_L1 ],
96+ rabbit_ct_broker_helpers :rpc (
97+ Config , 0 , rabbit_federation_status , status , [])),
98+ 1000 , 60 ),
9799 rabbit_ct_helpers :eventually (? _assertEqual ([? ONE_RUNNING_METRIC ],
98100 get_metrics (Config )),
99- 500 ,
100- 5 ),
101+ 1000 ,
102+ 30 ),
101103 maybe_declare_queue (Config , Ch , q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])),
102104 % % here we race against queue.declare... most of the times there is going to be
103105 % % new status=starting metric. In this case we wait a bit more for running=2.
@@ -109,13 +111,13 @@ single_link_then_second_added(Config) ->
109111 [? ONE_RUNNING_METRIC ] ->
110112 rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
111113 get_metrics (Config )),
112- 500 ,
113- 5 );
114+ 1000 ,
115+ 30 );
114116 [? ONE_RUNNING_ONE_STARTING_METRIC ] ->
115117 rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
116118 get_metrics (Config )),
117- 500 ,
118- 5 )
119+ 1000 ,
120+ 30 )
119121
120122 end ,
121123
@@ -126,12 +128,15 @@ two_links_from_the_start(Config) ->
126128 with_ch (
127129 Config ,
128130 fun (_Ch ) ->
129- timer :sleep (3000 ),
130- [_L1 | _L2 ] = rabbit_ct_broker_helpers :rpc (Config , 0 ,
131- rabbit_federation_status , status , []),
132- MFs = get_metrics (Config ),
133- [? TWO_RUNNING_METRIC ] = MFs
134-
131+ rabbit_ct_helpers :eventually (
132+ ? _assertMatch ([_L1 | _L2 ],
133+ rabbit_ct_broker_helpers :rpc (
134+ Config , 0 , rabbit_federation_status , status , [])),
135+ 1000 , 60 ),
136+ rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
137+ get_metrics (Config )),
138+ 1000 ,
139+ 30 )
135140 end , upstream_downstream () ++ [q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])]).
136141
137142% % -------------------------------------------------------------------
0 commit comments