Enable feature flag in test case
Always enable feature flag rabbit_mqtt_qos0_queue in test case rabbit_mqtt_qos0_queue_overflow because this test case does not make sense without the mqtt_qos0 queue type. Note that enabling the feature flag should always succeed because this test case runs on a single node, and therefore on a new version in mixed version tests.
This commit is contained in:
parent
91b56bd85d
commit
3cd7d80d04
|
|
@ -261,6 +261,8 @@ event_authentication_failure(Config) ->
|
||||||
%% Test that queue type rabbit_mqtt_qos0_queue drops QoS 0 messages when its
|
%% Test that queue type rabbit_mqtt_qos0_queue drops QoS 0 messages when its
|
||||||
%% max length is reached.
|
%% max length is reached.
|
||||||
rabbit_mqtt_qos0_queue_overflow(Config) ->
|
rabbit_mqtt_qos0_queue_overflow(Config) ->
|
||||||
|
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, rabbit_mqtt_qos0_queue),
|
||||||
|
|
||||||
Topic = atom_to_binary(?FUNCTION_NAME),
|
Topic = atom_to_binary(?FUNCTION_NAME),
|
||||||
Msg = binary:copy(<<"x">>, 1000),
|
Msg = binary:copy(<<"x">>, 1000),
|
||||||
NumMsgs = 10_000,
|
NumMsgs = 10_000,
|
||||||
|
|
@ -299,15 +301,10 @@ rabbit_mqtt_qos0_queue_overflow(Config) ->
|
||||||
%% We expect that
|
%% We expect that
|
||||||
%% 1. all sent messages were either received or dropped
|
%% 1. all sent messages were either received or dropped
|
||||||
?assertEqual(NumMsgs, NumReceived + NumDropped),
|
?assertEqual(NumMsgs, NumReceived + NumDropped),
|
||||||
case rabbit_ct_broker_helpers:is_feature_flag_enabled(Config, rabbit_mqtt_qos0_queue) of
|
|
||||||
true ->
|
|
||||||
%% 2. at least one message was dropped (otherwise our whole test case did not
|
%% 2. at least one message was dropped (otherwise our whole test case did not
|
||||||
%% test what it was supposed to test: that messages are dropped due to the
|
%% test what it was supposed to test: that messages are dropped due to the
|
||||||
%% server being overflowed with messages while the client receives too slowly)
|
%% server being overflowed with messages while the client receives too slowly)
|
||||||
?assert(NumDropped >= 1);
|
?assert(NumDropped >= 1),
|
||||||
false ->
|
|
||||||
?assertEqual(0, NumDropped)
|
|
||||||
end,
|
|
||||||
%% 3. we received at least 1000 messages because everything below the default
|
%% 3. we received at least 1000 messages because everything below the default
|
||||||
%% of mailbox_soft_limit=1000 should not be dropped
|
%% of mailbox_soft_limit=1000 should not be dropped
|
||||||
?assert(NumReceived >= 1000),
|
?assert(NumReceived >= 1000),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue