Assert on operations on both new and existing channels

Per suggestion from @acogoluegnes.
This commit is contained in:
Michael Klishin 2019-06-29 00:28:05 +02:00
parent 4a4f81c374
commit 369e4158c1
1 changed files with 5 additions and 0 deletions

View File

@ -188,11 +188,16 @@ test_successful_token_refresh(Config) ->
?assertEqual(ok, amqp_connection:update_secret(Conn, Token2, <<"token refresh">>)),
{ok, Ch2} = amqp_connection:open_channel(Conn),
#'queue.declare_ok'{queue = _} =
amqp_channel:call(Ch, #'queue.declare'{exclusive = true}),
#'queue.declare_ok'{queue = _} =
amqp_channel:call(Ch2, #'queue.declare'{exclusive = true}),
amqp_channel:close(Ch2),
close_connection_and_channel(Conn, Ch).
test_failed_connection_with_expired_token(Config) ->
{_Algo, Token} = generate_expired_token(Config, [<<"rabbitmq.configure:vhost1/*">>,
<<"rabbitmq.write:vhost1/*">>,