File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " rabbitmq-amqp-python-client"
3- version = " 0.1.0-beta.1 "
3+ version = " 0.1.0-beta.2 "
44description = " Python RabbitMQ client for AMQP 1.0 protocol"
55authors = [" RabbitMQ team" ]
66license = " Apache-2.0 license"
Original file line number Diff line number Diff line change @@ -95,6 +95,29 @@ def test_connection_oauth_refresh_token(environment_auth: Environment) -> None:
9595 connection .close ()
9696
9797
98+ def test_connection_oauth_refresh_token_with_disconnection (
99+ environment_auth : Environment ,
100+ ) -> None :
101+
102+ connection = environment_auth .connection ()
103+ connection .dial ()
104+ # let the token expire
105+ time .sleep (1 )
106+ raised = False
107+ # generate new token
108+ connection .refresh_token (token (datetime .now () + timedelta (milliseconds = 5000 )))
109+ delete_all_connections ()
110+ time .sleep (3 )
111+ try :
112+ management = connection .management ()
113+ management .declare_queue (QuorumQueueSpecification (name = "test-queue" ))
114+ except Exception :
115+ raised = True
116+
117+ assert raised is False
118+ connection .close ()
119+
120+
98121def test_environment_connections_management () -> None :
99122
100123 environment = Environment (uri = "amqp://guest:guest@localhost:5672/" )
You can’t perform that action at this time.
0 commit comments