debugger: wait for target startup before initialization - #64304
Conversation
|
Several previous attempts of deflaking were unsuccessful. |
Ok, I got it .Thanks ! |
88fe3e7 to
1e6cde7
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64304 +/- ##
==========================================
- Coverage 90.14% 90.14% -0.01%
==========================================
Files 746 746
Lines 242764 242819 +55
Branches 45739 45754 +15
==========================================
+ Hits 218848 218895 +47
+ Misses 15426 15425 -1
- Partials 8490 8499 +9
🚀 New features to boost your workflow:
|
|
@joyeecheung @trivikr Could you take a look at this? I believe this would fix the flaky tests that related to timou of macos ci |
|
@joyeecheung @trivikr Please take a look at this |
|
I think at the minimum the commit should explain why the previous flakes happen, and why the change is supposed to fix it? |
The debugger endpoint can accept a connection before the target has entered its startup wait. In that window,Runtime.runIfWaitingForDebugger may be handled too early, leaving the target waiting indefinitely. Use NodeRuntime.waitingForDebugger as a readiness handshake before initializing the debugger domains and releasing the target. Apply the handshake to both the interactive debugger and probe mode,and reject the wait if the session closes. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
Debugger tests spawn a debugger client and target process, then wait for asynchronous CLI output through a shared test helper.Under high parallel load on macOS, process scheduling and inspector communication can delay progress beyond the existing 15-second timeout, causing intermittent failures across multiple debugger tests. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
Run the debugger CLI in the per-test temporary directory so concurrent runs do not overwrite or remove the same node.cpuprofile file. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
|
@joyeecheung I have tried stress test for all test/parallel/test-debugger-*x1000 with -j 16 and all passed And also select one of flaky tests to run 1 million times to check and before github aciton timeout no one would fail |
Trying to fix the test error that triggered at previous pr when run github action ci/cd
https://github.com/nodejs/node/actions/runs/28730483133/job/85195106458?pr=64301