Uh oh!
There was an error while loading. Please reload this page.
bootstrap: adds exception handling for profiler bootstrap - #29552
bootstrap: adds exception handling for profiler bootstrap#29552shobhitchittora wants to merge 5 commits into
Conversation
bb08f04 to
e9e049eCompareshobhitchittora
commented
Sep 14, 2019
@addaleax The warning message can be better here. Any suggestions? Any straightforward way to write a test for this. Thinking of emitting the warning from child to parent and then asserting that. |
how about "The inspector is disabled, coverage could not be collected" |
Uh oh!
There was an error while loading. Please reload this page.
addaleax
commented
Sep 14, 2019
I think something along @devsnek’s suggestion is fine.
Yeah, spawning a child process that emits this warning and then checking its output would be the easiest way to test this 👍 |
Both |
addaleax
left a comment
There was a problem hiding this comment.
Both
./node ./test/parallel/test-coverage-with-inspector-disabled.js
andpython tools/test.py test/parallel/test-coverage-with-inspector-disabled.js
work fine for me on local, but the test is fails in CI. I might be missing something here. Is the child spawned correctly in the test added?
I might be wrong, but is there a chance it’s working for you locally because you locally compiled a version of Node.js that has the inspector disabled, but Travis CI builds the default version with inspector enabled?
I think it might make sense to add something like if (process.features.inspector) common.skip('Inspector enabled'); or something like it to the beginning of the test?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
shobhitchittora
commented
Sep 18, 2019
@addaleax Can this be closed and merged now? |
addaleax
commented
Sep 18, 2019
@shobhitchittora Yeah, once CI is green with the latest changes this should be good to go 👍 |
nodejs-github-bot
commented
Sep 18, 2019
nodejs-github-bot
commented
Sep 19, 2019
Trott
commented
Sep 23, 2019
@shobhitchittora Can you rebase to get rid of the conflict? |
exception handling for the case when profile is not bootstrapped when coverage is enabled. Fixes: nodejs#29542
0700615 to
bbb315dCompareTrott
commented
Sep 23, 2019
Never mind. I did it myself. At least one re-review would be good. @addaleax@joyeecheung |
nodejs-github-bot
commented
Sep 23, 2019
addaleax
commented
Sep 23, 2019
Landed in fdd5d4a 🎉 Thanks for the PR! |
shobhitchittora
commented
Sep 24, 2019
Thanks all for merging this. |
The bootstrapping of profiler failed the script evaluation when inspector is disabled. Adding a try-catch block to handle that and emit a warning.
Fixes: #29542
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes