(fix) tests: fix flaky test_no_connection_refused_on_timeout#769
Open
(fix) tests: fix flaky test_no_connection_refused_on_timeout#769
Conversation
cb979cb to
e5dc0bb
Compare
The test asserted that at least one WriteTimeout/WriteFailure must occur during 2000 concurrent LWT operations, but this is non-deterministic -- if the cluster handles all ops without timeout, the assertion fails. The actual purpose (PYTHON-91) is to verify the connection remains functional after LWT timeout stress. Replace the timeout assertion with a post-execution liveness check that verifies the session can still execute queries, and log a warning when the timeout path is not exercised.
e5dc0bb to
5478b79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_no_connection_refused_on_timeouttest that causes intermittent CI failures (including on PR (fix) test: Fix KeyError in test_idle_heartbeat with connection repla… #762)WriteTimeout/WriteFailuremust occur during 2000 concurrent LWT operations, but this is non-deterministic -- if the cluster handles all ops without timeout, the assertion failsChanges
tests/integration/standard/test_query.py: Replace the non-deterministicassert received_timeoutwith a post-execution liveness check that verifies the session can still execute queries after the LWT stress. Log a warning when the timeout path is not exercised.Root cause
The CI failure on PR #762 (
test libev (3.14)) was caused by this flaky test, not by the PR's actual changes (which only modifytest_cluster.py). The test failed because the 2000 concurrent LWT INSERT operations all completed without triggering aWriteTimeoutorWriteFailure.