Summary
The CMAP test clear with interruptInUseConnections = true closes pending connections has an race condition caused by its short 1 second block. If creating a connection takes significantly more than a second, the block will have already expired before the interrupting clear executes, causing the test to fail. This results in a flaky test dependent on local machine conditions and overhead to succeed. Increasing the block to a much higher length like 10 seconds would ensure that the clear successfully interrupts the vast majority of the time.
Motivation
Who is the affected end user?
Drivers teams.
How does this affect the end user?
N/A
How likely is it that this problem or use case will occur?
Inconsistent race condition dependent on thread switching and overhead time.
If the problem does occur, what are the consequences and how severe are they?
A test failing due to a race condition.
Is this issue urgent?
Needed to fix a flaky test.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Test improvements.
- related to
-
PYTHON-4156 CMAP interrupt pending connections test failures
- Closed