Skip to content

Commit c34c803

Browse files
authored
Remove flake in prometheus_http_SUITE (#14367)
Sometimes the metrics for streams created by `stream_pub_sub_metrics` would be returned when the next test starts, breaking the assertions.
1 parent 5f69116 commit c34c803

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deps/rabbitmq_prometheus/test/rabbit_prometheus_http_SUITE.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
-compile([export_all, nowarn_export_all]).
1717

18+
-import(rabbit_ct_helpers, [eventually/1]).
19+
-import(rabbit_ct_broker_helpers, [rpc/4]).
20+
1821
all() ->
1922
[
2023
{group, default_config},
@@ -831,6 +834,7 @@ stream_pub_sub_metrics(Config) ->
831834
lists:sort(maps:to_list(MaxOffsetLag))),
832835
dispose_stream_connection(S1, C1, list_to_binary(Stream1)),
833836
dispose_stream_connection(S2, C2, list_to_binary(Stream2)),
837+
eventually(?_assertEqual([], rpc(Config, rabbit_amqqueue, list_by_type, [stream]))),
834838
ok.
835839

836840
core_metrics_special_chars(Config) ->

0 commit comments

Comments
 (0)