File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ def environment_auth(pytestconfig):
4646 uri = "amqp://localhost:5672" ,
4747 oauth2_options = OAuth2Options (token = token_string ),
4848 )
49- # try:
50- return environment
49+ try :
50+ yield environment
5151
52- # finally:
53- # environment.close()
52+ finally :
53+ environment .close ()
5454
5555
5656@pytest .fixture ()
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ def test_connection_auth(environment_auth: Environment) -> None:
4949 connection .dial ()
5050 connection .close ()
5151
52+ def test_connection_auth_with_timeout (environment_auth : Environment ) -> None :
53+
54+ connection = environment_auth .connection ()
55+ connection .dial ()
56+ time .sleep (3 )
57+ connection .close ()
58+
5259
5360def test_environment_connections_management () -> None :
5461
You can’t perform that action at this time.
0 commit comments