Skip to content

Commit 86a0ebe

Browse files
MarcialRosalesmichaelklishin
authored andcommitted
First wait until shovel is terminated
1 parent 17e470e commit 86a0ebe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

deps/rabbitmq_shovel/test/configuration_SUITE.erl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ valid_configuration(Config) ->
228228

229229
valid_configuration_with_predefined_resources(Config) ->
230230
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, setup_shovels2, [Config]),
231+
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, await_terminated_shovel, [test_shovel]),
231232
declare_queue(Config),
232233
ok = rabbit_ct_broker_helpers:rpc(Config, 0, ?MODULE, await_running_shovel, [test_shovel]).
233234

@@ -413,3 +414,11 @@ await_running_shovel(Name) ->
413414
_ -> timer:sleep(100),
414415
await_running_shovel(Name)
415416
end.
417+
await_terminated_shovel(Name) ->
418+
case [N || {N, _, {terminated, _}, _}
419+
<- rabbit_shovel_status:status(),
420+
N =:= Name] of
421+
[_] -> ok;
422+
_ -> timer:sleep(100),
423+
await_terminated_shovel(Name)
424+
end.

0 commit comments

Comments
 (0)