@@ -98,13 +98,15 @@ single_link_then_second_added(Config) ->
9898 with_ch (
9999 Config ,
100100 fun (Ch ) ->
101- timer :sleep (3000 ),
102- [_L1 ] = rabbit_ct_broker_helpers :rpc (Config , 0 ,
103- rabbit_federation_status , status , []),
101+ rabbit_ct_helpers :eventually (
102+ ? _assertMatch ([_L1 ],
103+ rabbit_ct_broker_helpers :rpc (
104+ Config , 0 , rabbit_federation_status , status , [])),
105+ 1000 , 60 ),
104106 rabbit_ct_helpers :eventually (? _assertEqual ([? ONE_RUNNING_METRIC ],
105107 get_metrics (Config )),
106- 500 ,
107- 5 ),
108+ 1000 ,
109+ 30 ),
108110 maybe_declare_queue (Config , Ch , q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])),
109111 % % here we race against queue.declare... most of the times there is going to be
110112 % % new status=starting metric. In this case we wait a bit more for running=2.
@@ -116,14 +118,14 @@ single_link_then_second_added(Config) ->
116118 [? ONE_RUNNING_METRIC ] ->
117119 rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
118120 get_metrics (Config )),
119- 500 ,
120- 5 );
121+ 1000 ,
122+ 30 );
121123 [? ONE_RUNNING_ONE_STARTING_METRIC ] ->
122124 rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
123125 get_metrics (Config )),
124- 500 ,
125- 5 )
126-
126+ 1000 ,
127+ 30 )
128+
127129 end ,
128130
129131 delete_all (Ch , [q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])])
@@ -133,12 +135,15 @@ two_links_from_the_start(Config) ->
133135 with_ch (
134136 Config ,
135137 fun (_Ch ) ->
136- timer :sleep (3000 ),
137- [_L1 | _L2 ] = rabbit_ct_broker_helpers :rpc (Config , 0 ,
138- rabbit_federation_status , status , []),
139- MFs = get_metrics (Config ),
140- [? TWO_RUNNING_METRIC ] = MFs
141-
138+ rabbit_ct_helpers :eventually (
139+ ? _assertMatch ([_L1 | _L2 ],
140+ rabbit_ct_broker_helpers :rpc (
141+ Config , 0 , rabbit_federation_status , status , [])),
142+ 1000 , 60 ),
143+ rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
144+ get_metrics (Config )),
145+ 1000 ,
146+ 30 )
142147 end , upstream_downstream () ++ [q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])]).
143148
144149% % -------------------------------------------------------------------
0 commit comments