@@ -201,8 +201,8 @@ multiple_downstreams(Config) ->
201
201
fun (Ch ) ->
202
202
timer :sleep (? INITIAL_WAIT ),
203
203
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 )]).
206
206
207
207
message_flow (Config ) ->
208
208
% % TODO: specifc source / target here
@@ -258,36 +258,37 @@ federate_unfederate(Config) ->
258
258
fun (Ch ) ->
259
259
timer :sleep (? INITIAL_WAIT ),
260
260
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 ),
262
262
263
263
% % clear the policy
264
264
rabbit_ct_broker_helpers :clear_policy (Config , 0 , <<" fed" >>),
265
265
266
266
expect_no_federation (Ch , <<" upstream" >>, <<" fed.downstream" >>),
267
- expect_no_federation (Ch , <<" upstream " >>, <<" fed.downstream2 " >>),
267
+ expect_no_federation (Ch , <<" upstream2 " >>, <<" fed2.downstream " >>),
268
268
269
269
rabbit_ct_broker_helpers :set_policy (Config , 0 ,
270
270
<<" fed" >>, <<" ^fed\. " >>, <<" all" >>, [
271
271
{<<" federation-upstream-set" >>, <<" upstream" >>}])
272
- end , upstream_downstream (Config ) ++ [q (<<" fed.downstream2 " >>, Args )]).
272
+ end , upstream_downstream (Config ) ++ [q (<<" fed2.downstream " >>, Args )]).
273
273
274
274
dynamic_plugin_stop_start (Config ) ->
275
- DownQ2 = <<" fed.downstream2 " >>,
275
+ DownQ2 = <<" fed2.downstream " >>,
276
276
Args = ? config (target_queue_args , Config ),
277
277
with_ch (Config ,
278
278
fun (Ch ) ->
279
279
timer :sleep (? INITIAL_WAIT ),
280
- UpQ = <<" upstream" >>,
280
+ UpQ1 = <<" upstream" >>,
281
+ UpQ2 = <<" upstream2" >>,
281
282
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 ),
284
285
285
286
% % Disable the plugin, the link disappears
286
287
ct :pal (" Stopping rabbitmq_federation" ),
287
288
ok = rabbit_ct_broker_helpers :disable_plugin (Config , 0 , " rabbitmq_federation" ),
288
289
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 ),
291
292
292
293
maybe_declare_queue (Config , Ch , q (DownQ1 , Args )),
293
294
maybe_declare_queue (Config , Ch , q (DownQ2 , Args )),
@@ -305,12 +306,13 @@ dynamic_plugin_stop_start(Config) ->
305
306
Entry || Entry <- Status ,
306
307
proplists :get_value (queue , Entry ) =:= DownQ1 orelse
307
308
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 ,
309
311
proplists :get_value (status , Entry ) =:= running
310
312
],
311
313
length (L ) =:= 2
312
314
end ),
313
- expect_federation (Config , Ch , UpQ , DownQ1 , 120000 )
315
+ expect_federation (Config , Ch , UpQ1 , DownQ1 , 120000 )
314
316
end , upstream_downstream (Config ) ++ [q (DownQ2 , Args )]).
315
317
316
318
restart_upstream (Config ) ->
0 commit comments