Skip to content

0.1.0-beta.2 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rabbitmq-amqp-python-client"
version = "0.1.0-beta.1"
version = "0.1.0-beta.2"
description = "Python RabbitMQ client for AMQP 1.0 protocol"
authors = ["RabbitMQ team"]
license = "Apache-2.0 license"
Expand Down
23 changes: 23 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ def test_connection_oauth_refresh_token(environment_auth: Environment) -> None:
connection.close()


def test_connection_oauth_refresh_token_with_disconnection(
environment_auth: Environment,
) -> None:

connection = environment_auth.connection()
connection.dial()
# let the token expire
time.sleep(1)
raised = False
# generate new token
connection.refresh_token(token(datetime.now() + timedelta(milliseconds=5000)))
delete_all_connections()
time.sleep(3)
try:
management = connection.management()
management.declare_queue(QuorumQueueSpecification(name="test-queue"))
except Exception:
raised = True

assert raised is False
connection.close()


def test_environment_connections_management() -> None:

environment = Environment(uri="amqp://guest:guest@localhost:5672/")
Expand Down