File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-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 @@ -50,6 +50,14 @@ def test_connection_auth(environment_auth: Environment) -> None:
5050    connection .close ()
5151
5252
53+ def  test_connection_auth_with_timeout (environment_auth : Environment ) ->  None :
54+ 
55+     connection  =  environment_auth .connection ()
56+     connection .dial ()
57+     time .sleep (3 )
58+     connection .close ()
59+ 
60+ 
5361def  test_environment_connections_management () ->  None :
5462
5563    environment  =  Environment (uri = "amqp://guest:guest@localhost:5672/" )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments