Conversation
Co-authored-by: keradus <2716794+keradus@users.noreply.github.com>
|
@copilot examine the CI result. The test is failing on |
When stopOnViolation is enabled and a violation is found, the event loop must be explicitly stopped to prevent the test from hanging. On Linux, the processes don't clean up properly without stopping the loop, causing a 10-second timeout. Changes: - Added $streamSelectLoop to callback closures that call endAll() - Call $streamSelectLoop->stop() after $processPool->endAll() - Applied to both the violation handler and error handler Co-authored-by: keradus <2716794+keradus@users.noreply.github.com>
Fixed in commit 20e923f. The issue was that when The fix adds Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
bonus: it's also test that is randomly failing on MacOS example from master, perhaps we solve both issues at once |
--stopOnViolation
--stopOnViolation--stop-on-violation
This should cover more cases, basically it should stop the loop every time last process is stopped.
|
thanks @Wirone |
The
testParallelFixStopsOnFirstViolationIfSuchOptionIsEnabledtest was restricted to Darwin/Windows with@requires OS Darwin|Windows, preventing execution on Linux CI. After removing the restriction, the test was timing out on Linux after 10 seconds.Root Cause
When
stopOnViolation=trueand a file violation is detected in parallel mode, the code called$processPool->endAll()to terminate worker processes but didn't stop the React event loop. The event loop continued running, waiting for more events, causing the test to hang on Linux until PHPUnit's timeout.Changes
@requires OS Darwin|Windowsannotation and associated TODO comment$streamSelectLoop->stop()after$processPool->endAll()in:The fix ensures the React event loop is properly stopped when parallel processing terminates early, preventing timeouts on all platforms.
Testing
The changes are minimal and targeted, fixing the specific timeout issue while maintaining backward compatibility.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.