| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: nodejs#11261
| 'while(true);\n' + | ||
| 'j;'; | ||
|
|
||
| const ctx = vm.createContext({ |
There was a problem hiding this comment.
Can you drop theadd() function here as well?
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with a nit. Thanks Kunal!
Sorry, something went wrong.
| @@ -6,14 +6,10 @@ const spawn = require('child_process').spawn; | |||
|
|
|||
| if (process.argv[2] === 'child') { | |||
| const code = 'let j = 0;\n' + | |||
There was a problem hiding this comment.
Can you reduce the whole block to while(true); while you're at it? I.e. no need for declaring j either.
Sorry, something went wrong.
There was a problem hiding this comment.
I left it intentionally so it can be used in return, but with while(true); won't be necessary. Will remove it.
Sorry, something went wrong.
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: #11261 PR-URL: #11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: nodejs#11261 PR-URL: nodejs#11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: #11261 PR-URL: #11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: #11261 PR-URL: #11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: #11261 PR-URL: #11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
The intention of test case is to make sure that `timeout` property is honored and the code in context terminates and throws correct exception. However in test case, the code inside context would complete before `timeout` for windows and would sometimes fail. Updated the code so it guarantee to not complete execution until timeout is triggered. Fixes: #11261 PR-URL: #11530 Reviewed-By: James M Snell <jasnell.gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
|
@kunalspathak FWIW: Got my testing stuck today on this test on Windows 7 x64. Process explorer showed node process suspended. I had commanded to resume the node process and the test ended successfully. However, I could not reproduce this afterward by running this test separately. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The intention of test case is to make sure that timeout property is honored
and the code in context terminates and throws correct exception. However in
test case, the code inside context would complete before timeout for windows
and would sometimes fail. Updated the code so it guarantee to not complete
execution until timeout is triggered.
Fixes: #11261
Checklist
Affected core subsystem(s)