Skip some assertions in mixed version tests
See commit message 00c77e0a1a
for details.
In a multi node mixed version cluster where the lower version is
compiled with a different OTP version, anonymous Ra leader queries will
fail with a badfun error if initiated on the higher version and executed
on the leader on the lower version node.
This commit is contained in:
parent
bc16e9fa27
commit
c8b90488e7
|
@ -154,7 +154,7 @@ rabbitmq_integration_suite(
|
|||
":test_util_beam",
|
||||
],
|
||||
flaky = True,
|
||||
shard_count = 6,
|
||||
shard_count = 4,
|
||||
sharding_method = "case",
|
||||
runtime_deps = [
|
||||
"@emqtt//:erlang_app",
|
||||
|
|
|
@ -43,8 +43,7 @@ groups() ->
|
|||
cluster_size_5() ->
|
||||
[
|
||||
connection_id_tracking,
|
||||
connection_id_tracking_on_nodedown,
|
||||
connection_id_tracking_with_decommissioned_node
|
||||
connection_id_tracking_on_nodedown
|
||||
].
|
||||
|
||||
%% -------------------------------------------------------------------
|
||||
|
@ -143,25 +142,6 @@ connection_id_tracking_on_nodedown(Config) ->
|
|||
await_exit(C),
|
||||
ok = eventually(?_assertEqual([], util:all_connection_pids(1, Config)), 500, 4).
|
||||
|
||||
connection_id_tracking_with_decommissioned_node(Config) ->
|
||||
case rpc(Config, rabbit_mqtt_ff, track_client_id_in_ra, []) of
|
||||
false ->
|
||||
{skip, "This test requires client ID tracking in Ra"};
|
||||
true ->
|
||||
Server = get_node_config(Config, 0, nodename),
|
||||
C = connect(<<"simpleClient">>, Config, ?OPTS),
|
||||
{ok, _, _} = emqtt:subscribe(C, <<"TopicA">>, qos0),
|
||||
ok = emqtt:publish(C, <<"TopicA">>, <<"Payload">>),
|
||||
ok = expect_publishes(C, <<"TopicA">>, [<<"Payload">>]),
|
||||
|
||||
assert_connection_count(Config, 4, 1),
|
||||
process_flag(trap_exit, true),
|
||||
{ok, _} = rabbitmqctl(Config, 0, ["decommission_mqtt_node", Server]),
|
||||
await_exit(C),
|
||||
assert_connection_count(Config, 4, 0),
|
||||
ok
|
||||
end.
|
||||
|
||||
%%
|
||||
%% Helpers
|
||||
%%
|
||||
|
|
|
@ -1380,7 +1380,15 @@ duplicate_client_id(Config) ->
|
|||
ClientId2 = <<"c2">>,
|
||||
C1a = connect(ClientId1, Config, Server2, []),
|
||||
C2a = connect(ClientId2, Config, Server1, []),
|
||||
eventually(?_assertEqual(2, length(all_connection_pids(Config)))),
|
||||
case is_feature_flag_enabled(Config, delete_ra_cluster_mqtt_node) of
|
||||
true ->
|
||||
eventually(?_assertEqual(2, length(all_connection_pids(Config))));
|
||||
false ->
|
||||
%% When different OTP versions are used for compilation, the
|
||||
%% rabbit_mqtt_collector module version will change and cause
|
||||
%% a bad fun error when executing ra:leader_query/2 remotely.
|
||||
timer:sleep(200)
|
||||
end,
|
||||
process_flag(trap_exit, true),
|
||||
C1b = connect(ClientId1, Config, Server1, []),
|
||||
C2b = connect(ClientId2, Config, Server2, []),
|
||||
|
@ -1389,7 +1397,12 @@ duplicate_client_id(Config) ->
|
|||
await_exit(C1a),
|
||||
await_exit(C2a),
|
||||
timer:sleep(200),
|
||||
?assertEqual(2, length(all_connection_pids(Config))),
|
||||
case is_feature_flag_enabled(Config, delete_ra_cluster_mqtt_node) of
|
||||
true ->
|
||||
?assertEqual(2, length(all_connection_pids(Config)));
|
||||
false ->
|
||||
ok
|
||||
end,
|
||||
ok = emqtt:disconnect(C1b),
|
||||
ok = emqtt:disconnect(C2b),
|
||||
eventually(?_assertEqual(0, length(all_connection_pids(Config)))).
|
||||
|
|
Loading…
Reference in New Issue