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):
46
46
uri = "amqp://localhost:5672" ,
47
47
oauth2_options = OAuth2Options (token = token_string ),
48
48
)
49
- # try:
50
- return environment
49
+ try :
50
+ yield environment
51
51
52
- # finally:
53
- # environment.close()
52
+ finally :
53
+ environment .close ()
54
54
55
55
56
56
@pytest .fixture ()
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ def test_connection_auth(environment_auth: Environment) -> None:
49
49
connection .dial ()
50
50
connection .close ()
51
51
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
+
52
59
53
60
def test_environment_connections_management () -> None :
54
61
You can’t perform that action at this time.
0 commit comments