Open
Description
Description:
A flaky test failure was observed in the following CI job:
https://github.com/valkey-io/valkey-glide/actions/runs/16257279877/job/45895651443
Details:
Test: tests/test_lazy_connection.py::TestLazyConnection::test_lazy_connection_establishes_on_first_command[trio-ProtocolVersion.RESP2-False]
Failure:
AssertionError: Lazy client (standalone, ProtocolVersion.RESP2) should establish 1 new connection(s) after the first command.
assert 48 == (48 + 1)
This test can be flaky due to running in parallel against the same Valkey instance, causing unpredictable connection count assertion failures.
Recommendation:
Ensure this test runs with proper isolation or restart the Valkey server before execution.
Review the lazy connection logic for reliability with trio and ProtocolVersion.RESP2.
Confirm test assertions and connection count measurements are correct.