Skip to content

Commit e981ed2

Browse files
mkuratczykmergify[bot]
authored andcommitted
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. (cherry picked from commit c34c803)
1 parent 5ed8ac5 commit e981ed2

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},
@@ -809,6 +812,7 @@ stream_pub_sub_metrics(Config) ->
809812
lists:sort(maps:to_list(MaxOffsetLag))),
810813
dispose_stream_connection(S1, C1, list_to_binary(Stream1)),
811814
dispose_stream_connection(S2, C2, list_to_binary(Stream2)),
815+
eventually(?_assertEqual([], rpc(Config, rabbit_amqqueue, list_by_type, [stream]))),
812816
ok.
813817

814818
core_metrics_special_chars(Config) ->

0 commit comments

Comments
 (0)