Repository navigation
[Tests] Fix flaky popen pool executor test - #19746
Conversation
There was a problem hiding this comment.
Code Review
This pull request increases the timeout for the PopenPoolExecutor in a unit test from 10ms to 15ms. The reviewer recommends increasing this timeout further to 100ms (0.1s) to avoid potential test flakiness on busy CI runners, while still keeping the test execution time negligible.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import tvm | ||
|
|
||
| pool = PopenPoolExecutor(max_workers=2, timeout=0.01) | ||
| pool = PopenPoolExecutor(max_workers=2, timeout=0.015) |
There was a problem hiding this comment.
While increasing the timeout from 10ms to 15ms reduces the likelihood of a race condition, 15ms is still extremely short and highly susceptible to flakiness in busy CI environments where CPU scheduling delays can easily exceed 15ms. Since value1 is submitted with a 100-second delay (identity_after, 1, 100), we can safely increase the pool timeout to a more robust value like 0.1 (100ms) or 0.2 (200ms). This will make the test significantly more stable on loaded CI runners while keeping the test execution time negligible.
| pool = PopenPoolExecutor(max_workers=2, timeout=0.015) | |
| pool = PopenPoolExecutor(max_workers=2, timeout=0.1) |
This pr increases the timeout in `test_popen_pool_executor` from 10ms to 15ms. The original 10ms timeout could race with the `terminate_self()` case under local/full-suite load, causing the worker-exit path to be reported as `TimeoutError` instead of `ChildProcessError`. (cherry picked from commit 955c786)
This pr increases the timeout in `test_popen_pool_executor` from 10ms to 15ms. The original 10ms timeout could race with the `terminate_self()` case under local/full-suite load, causing the worker-exit path to be reported as `TimeoutError` instead of `ChildProcessError`. (cherry picked from commit 955c786)
This pr increases the timeout in `test_popen_pool_executor` from 10ms to 15ms. The original 10ms timeout could race with the `terminate_self()` case under local/full-suite load, causing the worker-exit path to be reported as `TimeoutError` instead of `ChildProcessError`.
This pr increases the timeout in `test_popen_pool_executor` from 10ms to 15ms. The original 10ms timeout could race with the `terminate_self()` case under local/full-suite load, causing the worker-exit path to be reported as `TimeoutError` instead of `ChildProcessError`.
This pr increases the timeout in
test_popen_pool_executorfrom 10ms to 15ms.The original 10ms timeout could race with the
terminate_self()case under local/full-suite load, causing the worker-exit path to be reported asTimeoutErrorinstead ofChildProcessError.