| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
@nodejs/test_runner this only solves one issue, there seems to be another issue with the process not being alive long enough to pipe the entire stream, see not ok 9 - should support a 'js' file as a custom reporter
21:45:52 ---
21:45:52 duration_ms: 1125.36918
21:45:52 failureType: 'testCodeFailure'
21:45:52 error: |-
21:45:52 The input did not match the regular expression /{"test:start":4,"test:pass":2,"test:fail":2,"test:plan":2,"test:diagnostic":\d+}$/. Input:
21:45:52
21:45:52 'custom.js {"test:start":1}'
21:45:52
21:45:52 code: 'ERR_ASSERTION'
21:45:52 actual: 'custom.js {"test:start":1}'
21:45:52 operator: 'match'
21:45:52 stack: |-
21:45:52 Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-plinux/nodes/rhel8-ppc64le/test/parallel/test-runner-reporters.js:93:14)
21:45:52 ItTest.runInAsyncScope (node:async_hooks:206:9)
21:45:52 ItTest.run (node:internal/test_runner/test:552:25)
21:45:52 ItTest.start (node:internal/test_runner/test:468:17)
21:45:52 node:internal/test_runner/test:811:71
21:45:52 node:internal/per_context/primordials:470:82
21:45:52 new Promise (<anonymous>)
21:45:52 new SafePromise (node:internal/per_context/primordials:438:29)
21:45:52 node:internal/per_context/primordials:470:9
21:45:52 Array.map (<anonymous>)
I am trying to work on the additional issue on a separate PR |
Sorry, something went wrong.
Sorry, something went wrong.
|
Should we wait for the child process's 'close' event instead of 'exit'? |
Sorry, something went wrong.
once the child process is not alive, transforming the output asynchronously is not enough for keeping the main process alive I have solved that like this: @@ -123,13 +125,16 @@ function setup(root) {
const rejectionHandler =
createProcessEventHandler('unhandledRejection', root);
const coverage = configureCoverage(root);
- const exitHandler = () => {
+ const exitHandler = async () => {
root.coverage = collectCoverage(root, coverage);
root.postRun(new ERR_TEST_FAILURE(
'Promise resolution is still pending but the event loop has already resolved',
kCancelledByParent));
hook.disable();
+ const handle = setInterval(() => {}, 1000);
+ await finished(root.reporter);
+ clearInterval(handle);
process.removeListener('unhandledRejection', rejectionHandler);
process.removeListener('uncaughtException', exceptionHandler);
};but that is kind of a hack |
Sorry, something went wrong.
|
if anyone wants to tackle this it reproduces running tools/test.py -J test/parallel/test-runner-reporters.js --repeat 1000 |
Sorry, something went wrong.
Interestingly, I haven't been able to get it to reproduce on my machine (M1 mac).
Definitely a hack, but if there is no way to keep the process alive, I'd be OK with doing something like that, but I think it should exist in run() and the interval period should be large. |
Sorry, something went wrong.
Mine is a M1 mac as well 😕 |
Sorry, something went wrong.
@cjihrig I have tried that but it creates a deadlock - adding a timer prevents the process from reaching beforeExit since the event loop hasn't ended, |
Sorry, something went wrong.
There was a problem hiding this comment.
How is the stream still working but not keeping the process alive? Is there a resource somewhere that we unref()d ?
Sorry, something went wrong.
There was a problem hiding this comment.
see #22088 (comment)
the reporters transform the output after the child process are done
Sorry, something went wrong.
There was a problem hiding this comment.
By the way, do we have any idea which change introduced the current flakiness? After the CI was unlocked from the security release, a flurry of changes landed and then this test became flaky. Are we able to bisect it?
Sorry, something went wrong.
There was a problem hiding this comment.
I am bisecting now
Sorry, something went wrong.
There was a problem hiding this comment.
@cjihrig according to git bisect flakiness started after b4a962d landed, so it would have probably become flaky even without the latest test runner changes.
CC @debadree25 @nodejs/streams
Sorry, something went wrong.
There was a problem hiding this comment.
Interesting, investigating then, could you guide me if at any place in the test_runner code where pipeline maybe being used?
Sorry, something went wrong.
There was a problem hiding this comment.
I assume the timing condition we might be facing is within setupTestReporters
where getReportersMap is fulfilled after all the tests completed running
node/lib/internal/test_runner/utils.js
Lines 151 to 158 in 5e954c3
Sorry, something went wrong.
There was a problem hiding this comment.
Ah understood, thank you checking this
Sorry, something went wrong.
There was a problem hiding this comment.
For the record: I think the issue is in the test runner, not in change performed to streams
Sorry, something went wrong.
There was a problem hiding this comment.
So far no success in thinking with reference to b4a962d only think that comes to mind is if anyway testsStream ended before somehow? but that also doesn't hold up much 😕 nonetheless will try explore a little more just incase
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if the CI passes - definitely nicer than adding a keep alive timer.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/46737 ✔ Done loading data for nodejs/node/pull/46737 ----------------------------------- PR info ------------------------------------ Title test_runner: bootstrap reporters before running tests (#46737) Author Moshe Atlow (@MoLow) Branch MoLow:wait-for-parser-to-finish -> nodejs:main Labels flaky-test, author ready, needs-ci, dont-land-on-v14.x, test_runner Commits 1 - test_runner: bootstrap reporters before running tests Committers 1 - Moshe Atlow PR-URL: https://github.com/nodejs/node/pull/46737 Fixes: https://github.com/nodejs/node/issues/46747 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/46737 Fixes: https://github.com/nodejs/node/issues/46747 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig -------------------------------------------------------------------------------- ℹ This PR was created on Sun, 19 Feb 2023 19:16:17 GMT ✔ Approvals: 2 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/46737#pullrequestreview-1308076791 ✔ - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/46737#pullrequestreview-1307932394 ✖ GitHub CI is still running ℹ Last Full PR CI on 2023-02-21T19:30:15Z: https://ci.nodejs.org/job/node-test-pull-request/49848/ - Querying data for job/node-test-pull-request/49848/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/4236769504 |
Sorry, something went wrong.
PR-URL: nodejs#46737 Fixes: nodejs#46747 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
Fixes: #46747
I believe this will address these test failures:
https://ci.nodejs.org/job/node-test-binary-windows-js-suites/19156/