Skip to content

Commit b9b76f2

Browse files
committed
Use ra:member_overview instead of rabbit_fifo:overview
member_overview works better with different machine versions
1 parent 274db7c commit b9b76f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

deps/rabbit/test/quorum_queue_SUITE.erl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3986,7 +3986,7 @@ receive_and_ack(Ch) ->
39863986
end.
39873987

39883988
message_ttl_policy(Config) ->
3989-
%% Using ttl is very difficul to guarantee 100% test rate success, unless
3989+
%% Using ttl is very difficult to guarantee 100% test rate success, unless
39903990
%% using really high ttl values. Previously, this test used 1s and 3s ttl,
39913991
%% but expected to see first the messages in the queue and then the messages
39923992
%% gone. A slow CI run, would fail the first assertion as the messages would
@@ -4006,9 +4006,8 @@ message_ttl_policy(Config) ->
40064006
VHost = <<"%2F">>,
40074007
RaName = binary_to_atom(<<VHost/binary, "_", QQ/binary>>, utf8),
40084008

4009-
QueryFun = fun rabbit_fifo:overview/1,
4010-
?awaitMatch({ok, {_, #{config := #{msg_ttl := 1000}}}, _},
4011-
rpc:call(Server, ra, local_query, [RaName, QueryFun]),
4009+
?awaitMatch({ok, #{machine := #{config := #{msg_ttl := 1000}}}, _},
4010+
rpc:call(Server, ra, member_overview, [RaName]),
40124011
?DEFAULT_AWAIT),
40134012
Msg1 = <<"msg1">>,
40144013
Msg2 = <<"msg11">>,
@@ -4020,8 +4019,8 @@ message_ttl_policy(Config) ->
40204019
ok = rabbit_ct_broker_helpers:set_policy(Config, 0, <<"msg-ttl">>,
40214020
QQ, <<"queues">>,
40224021
[{<<"message-ttl">>, 1000}]),
4023-
{ok, {_, Overview2}, _} = rpc:call(Server, ra, local_query, [RaName, QueryFun]),
4024-
?assertMatch(#{config := #{msg_ttl := 1000}}, Overview2),
4022+
{ok, Overview2, _} = rpc:call(Server, ra, member_overview, [RaName]),
4023+
?assertMatch(#{machine := #{config := #{msg_ttl := 1000}}}, Overview2),
40254024
publish(Ch, QQ, Msg1),
40264025
wait_for_messages(Config, [[QQ, <<"1">>, <<"1">>, <<"0">>]]),
40274026
wait_for_messages(Config, [[QQ, <<"0">>, <<"0">>, <<"0">>]]),

0 commit comments

Comments
 (0)