@@ -98,13 +98,15 @@ single_link_then_second_added(Config) ->
98
98
with_ch (
99
99
Config ,
100
100
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 ),
104
106
rabbit_ct_helpers :eventually (? _assertEqual ([? ONE_RUNNING_METRIC ],
105
107
get_metrics (Config )),
106
- 500 ,
107
- 5 ),
108
+ 1000 ,
109
+ 30 ),
108
110
maybe_declare_queue (Config , Ch , q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])),
109
111
% % here we race against queue.declare... most of the times there is going to be
110
112
% % 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) ->
116
118
[? ONE_RUNNING_METRIC ] ->
117
119
rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
118
120
get_metrics (Config )),
119
- 500 ,
120
- 5 );
121
+ 1000 ,
122
+ 30 );
121
123
[? ONE_RUNNING_ONE_STARTING_METRIC ] ->
122
124
rabbit_ct_helpers :eventually (? _assertEqual ([? TWO_RUNNING_METRIC ],
123
125
get_metrics (Config )),
124
- 500 ,
125
- 5 )
126
-
126
+ 1000 ,
127
+ 30 )
128
+
127
129
end ,
128
130
129
131
delete_all (Ch , [q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])])
@@ -133,12 +135,15 @@ two_links_from_the_start(Config) ->
133
135
with_ch (
134
136
Config ,
135
137
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 )
142
147
end , upstream_downstream () ++ [q (<<" fed.downstream2" >>, [{<<" x-queue-type" >>, longstr , <<" classic" >>}])]).
143
148
144
149
% % -------------------------------------------------------------------
0 commit comments