Avoid crash in test case
Avoid the following unexpected error in mixed version testing where
feature flag credit_api_v2 is disabled:
```
[error] <0.1319.0> Timed out waiting for credit reply from quorum queue 'stop' in vhost '/'. Hint: Enable feature flag credit_api_v2
[warning] <0.1319.0> Closing session for connection <0.1314.0>: {'v1_0.error',
[warning] <0.1319.0> {symbol,<<"amqp:internal-error">>},
[warning] <0.1319.0> {utf8,
[warning] <0.1319.0> <<"Timed out waiting for credit reply from quorum queue 'stop' in vhost '/'. Hint: Enable feature flag credit_api_v2">>},
[warning] <0.1319.0> undefined}
[error] <0.1319.0> ** Generic server <0.1319.0> terminating
[error] <0.1319.0> ** Last message in was {'$gen_cast',
[error] <0.1319.0> {frame_body,
[error] <0.1319.0> {'v1_0.flow',
[error] <0.1319.0> {uint,283},
[error] <0.1319.0> {uint,65535},
[error] <0.1319.0> {uint,298},
[error] <0.1319.0> {uint,4294967295},
[error] <0.1319.0> {uint,1},
[error] <0.1319.0> {uint,282},
[error] <0.1319.0> {uint,50},
[error] <0.1319.0> {uint,0},
[error] <0.1319.0> undefined,undefined,undefined}}}
```
Presumably, the server session proc timed out receiving a credit reply from
the quorum queue because the test case deleted the quorum queue
concurrently with the client (and therefore also the server session
process) topping up link credit.
This commit detaches the link first and ends the session synchronously
before deleting the quorum queue.
This commit is contained in:
parent
083800809f
commit
6aa2de3f4f
|
|
@ -1810,9 +1810,11 @@ stop(QType, Config) ->
|
|||
Msgs1 = receive_messages(Receiver, NumRemaining),
|
||||
?assertEqual([<<"1">>], amqp10_msg:body(lists:last(Msgs1))),
|
||||
|
||||
ok = amqp10_client:detach_link(Receiver),
|
||||
ok = end_session_sync(Session),
|
||||
ok = amqp10_client:close_connection(Connection),
|
||||
#'queue.delete_ok'{} = amqp_channel:call(Ch, #'queue.delete'{queue = QName}),
|
||||
ok = rabbit_ct_client_helpers:close_channel(Ch),
|
||||
ok = amqp10_client:close_connection(Connection).
|
||||
ok = rabbit_ct_client_helpers:close_channel(Ch).
|
||||
|
||||
single_active_consumer_classic_queue(Config) ->
|
||||
single_active_consumer(<<"classic">>, Config).
|
||||
|
|
|
|||
Loading…
Reference in New Issue