@@ -201,8 +201,8 @@ multiple_downstreams(Config) ->
201201 fun (Ch ) ->
202202 timer :sleep (? INITIAL_WAIT ),
203203 expect_federation (Config , Ch , <<" upstream" >>, <<" fed.downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
204- expect_federation (Config , Ch , <<" upstream " >>, <<" fed.downstream2 " >>, ? EXPECT_FEDERATION_TIMEOUT )
205- end , upstream_downstream (Config ) ++ [q (<<" fed.downstream2 " >>, Args )]).
204+ expect_federation (Config , Ch , <<" upstream2 " >>, <<" fed2.downstream " >>, ? EXPECT_FEDERATION_TIMEOUT )
205+ end , upstream_downstream (Config ) ++ [q (<<" fed2.downstream " >>, Args )]).
206206
207207message_flow (Config ) ->
208208 % % TODO: specifc source / target here
@@ -258,36 +258,37 @@ federate_unfederate(Config) ->
258258 fun (Ch ) ->
259259 timer :sleep (? INITIAL_WAIT ),
260260 expect_federation (Config , Ch , <<" upstream" >>, <<" fed.downstream" >>, ? EXPECT_FEDERATION_TIMEOUT ),
261- expect_federation (Config , Ch , <<" upstream " >>, <<" fed.downstream2 " >>, ? EXPECT_FEDERATION_TIMEOUT ),
261+ expect_federation (Config , Ch , <<" upstream2 " >>, <<" fed2.downstream " >>, ? EXPECT_FEDERATION_TIMEOUT ),
262262
263263 % % clear the policy
264264 rabbit_ct_broker_helpers :clear_policy (Config , 0 , <<" fed" >>),
265265
266266 expect_no_federation (Ch , <<" upstream" >>, <<" fed.downstream" >>),
267- expect_no_federation (Ch , <<" upstream " >>, <<" fed.downstream2 " >>),
267+ expect_no_federation (Ch , <<" upstream2 " >>, <<" fed2.downstream " >>),
268268
269269 rabbit_ct_broker_helpers :set_policy (Config , 0 ,
270270 <<" fed" >>, <<" ^fed\. " >>, <<" all" >>, [
271271 {<<" federation-upstream-set" >>, <<" upstream" >>}])
272- end , upstream_downstream (Config ) ++ [q (<<" fed.downstream2 " >>, Args )]).
272+ end , upstream_downstream (Config ) ++ [q (<<" fed2.downstream " >>, Args )]).
273273
274274dynamic_plugin_stop_start (Config ) ->
275- DownQ2 = <<" fed.downstream2 " >>,
275+ DownQ2 = <<" fed2.downstream " >>,
276276 Args = ? config (target_queue_args , Config ),
277277 with_ch (Config ,
278278 fun (Ch ) ->
279279 timer :sleep (? INITIAL_WAIT ),
280- UpQ = <<" upstream" >>,
280+ UpQ1 = <<" upstream" >>,
281+ UpQ2 = <<" upstream2" >>,
281282 DownQ1 = <<" fed.downstream" >>,
282- expect_federation (Config , Ch , UpQ , DownQ1 , ? EXPECT_FEDERATION_TIMEOUT ),
283- expect_federation (Config , Ch , UpQ , DownQ2 , ? EXPECT_FEDERATION_TIMEOUT ),
283+ expect_federation (Config , Ch , UpQ1 , DownQ1 , ? EXPECT_FEDERATION_TIMEOUT ),
284+ expect_federation (Config , Ch , UpQ2 , DownQ2 , ? EXPECT_FEDERATION_TIMEOUT ),
284285
285286 % % Disable the plugin, the link disappears
286287 ct :pal (" Stopping rabbitmq_federation" ),
287288 ok = rabbit_ct_broker_helpers :disable_plugin (Config , 0 , " rabbitmq_federation" ),
288289
289- expect_no_federation (Ch , UpQ , DownQ1 ),
290- expect_no_federation (Ch , UpQ , DownQ2 ),
290+ expect_no_federation (Ch , UpQ1 , DownQ1 ),
291+ expect_no_federation (Ch , UpQ2 , DownQ2 ),
291292
292293 maybe_declare_queue (Config , Ch , q (DownQ1 , Args )),
293294 maybe_declare_queue (Config , Ch , q (DownQ2 , Args )),
@@ -305,12 +306,13 @@ dynamic_plugin_stop_start(Config) ->
305306 Entry || Entry <- Status ,
306307 proplists :get_value (queue , Entry ) =:= DownQ1 orelse
307308 proplists :get_value (queue , Entry ) =:= DownQ2 ,
308- proplists :get_value (upstream_queue , Entry ) =:= UpQ ,
309+ proplists :get_value (upstream_queue , Entry ) =:= UpQ1 orelse
310+ proplists :get_value (upstream_queue , Entry ) =:= UpQ2 ,
309311 proplists :get_value (status , Entry ) =:= running
310312 ],
311313 length (L ) =:= 2
312314 end ),
313- expect_federation (Config , Ch , UpQ , DownQ1 , 120000 )
315+ expect_federation (Config , Ch , UpQ1 , DownQ1 , 120000 )
314316 end , upstream_downstream (Config ) ++ [q (DownQ2 , Args )]).
315317
316318restart_upstream (Config ) ->
0 commit comments