File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " rabbitmq-amqp-python-client"
3
- version = " 0.1.0-beta.1 "
3
+ version = " 0.1.0-beta.2 "
4
4
description = " Python RabbitMQ client for AMQP 1.0 protocol"
5
5
authors = [" RabbitMQ team" ]
6
6
license = " 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:
95
95
connection .close ()
96
96
97
97
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
+
98
121
def test_environment_connections_management () -> None :
99
122
100
123
environment = Environment (uri = "amqp://guest:guest@localhost:5672/" )
You can’t perform that action at this time.
0 commit comments