Skip to content

Commit 99ba0cd

Browse files
committed
tests: fix auth warning assertion for --smp 2 compatibility
The test_can_connect_with_sslauth test asserted exact equality between auth warning count and ReadyMessage count. With --smp 2, shard-aware connections produce additional ReadyMessages, breaking the equality. Drop the exact equality check and keep only the >= 4 lower bound, which validates the test's actual intent: warnings are issued when auth is configured but the server does not challenge.
1 parent 37fc3c4 commit 99ba0cd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/integration/standard/test_cluster.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,13 @@ def _warning_are_issued_when_auth(self, auth_provider):
720720
session = cluster.connect()
721721
assert session.execute("SELECT * from system.local WHERE key='local'") is not None
722722

723-
# Three conenctions to nodes plus the control connection
723+
# Verify that auth warnings are issued for connections where
724+
# auth is configured but the server does not send a challenge.
725+
# At minimum: 3 nodes + 1 control connection = 4 warnings.
726+
# With --smp >= 2, additional shard-aware connections may also
727+
# produce warnings, so we only assert a lower bound.
724728
auth_warning = mock_handler.get_message_count('warning', "An authentication challenge was not sent")
725729
assert auth_warning >= 4
726-
assert auth_warning == mock_handler.get_message_count("debug", "Got ReadyMessage on new connection")
727730

728731
def _wait_for_all_shard_connections(self, cluster, timeout=30):
729732
"""Wait until all shard-aware connections are fully established."""

0 commit comments

Comments
 (0)