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
|
||||
%% max length is reached.
|
||||
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),
|
||||
Msg = binary:copy(<<"x">>, 1000),
|
||||
NumMsgs = 10_000,
|
||||
|
|
@ -299,15 +301,10 @@ rabbit_mqtt_qos0_queue_overflow(Config) ->
|
|||
%% We expect that
|
||||
%% 1. all sent messages were either received or dropped
|
||||
?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
|
||||
%% 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)
|
||||
?assert(NumDropped >= 1);
|
||||
false ->
|
||||
?assertEqual(0, NumDropped)
|
||||
end,
|
||||
%% 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
|
||||
%% server being overflowed with messages while the client receives too slowly)
|
||||
?assert(NumDropped >= 1),
|
||||
%% 3. we received at least 1000 messages because everything below the default
|
||||
%% of mailbox_soft_limit=1000 should not be dropped
|
||||
?assert(NumReceived >= 1000),
|
||||
|
|
|
|||
Loading…
Reference in New Issue