Skip to content

Commit 93aaebc

Browse files
committed
Tests: catch exception on connection closed
The tests force closing the connection with an error
1 parent 895cd25 commit 93aaebc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbitmq_auth_backend_oauth2/test/system_SUITE.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ test_failed_token_refresh_case1(Config) ->
924924
?assertExit({{shutdown, {server_initiated_close, 403, _}}, _},
925925
amqp_channel:call(Ch2, #'queue.declare'{queue = <<"a.q">>, exclusive = true})),
926926

927-
close_connection(Conn).
927+
catch close_connection(Conn).
928928

929929
refreshed_token_cannot_change_username(Config) ->
930930
{_, Token} = generate_valid_token_with_sub(Config, <<"username">>),
@@ -950,7 +950,7 @@ test_failed_token_refresh_case2(Config) ->
950950
?assertExit({{shutdown, {connection_closing, {server_initiated_close, 530, _}}}, _},
951951
amqp_connection:open_channel(Conn)),
952952

953-
close_connection(Conn).
953+
catch close_connection(Conn).
954954

955955

956956
test_successful_connection_with_with_single_scope_alias_in_extra_scopes_source(Config) ->

0 commit comments

Comments
 (0)