-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: improve test-async-hooks-http-parser-destroy #27319
Conversation
if (createdIds.includes(asyncId)) { | ||
// Work around https://github.com/nodejs/node/issues/26961. | ||
// Remove the next line when #26961 is fixed. | ||
if (!destroyedIds.includes(asyncId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not include this part and instead mark this test as flaky. Otherwise we might forget about it and the test will silently work while it should fail.
The failure indicates that we have a bug somewhere that we should fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you're saying and I'm definitely sympathetic. The problem is that with the changes in this PR, the test will basically fail 100% of the time. And I'm generally not OK with marking a test "flaky" as a workaround for a test that fails on every run. But the change is (IMO) a genuine improvement. It makes the checks more thorough (which is why it increases the failure rate dramatically).
I guess the solution everyone can support would be to fix the underlying bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that ece5073 landed, let's see if that fixes the remaining issues here and if I can remove this workaround.... Going to run CI with this and then again without it....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like HTTPPARSER
ids never show up now. I imagine that's unintended....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it totally was intentional. Guess I need to update the test to use HTTPINCOMINGMESSAGE or something like that. Or maybe the test can/should be removed entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the thing to do is to simply not filter the asyncIDs at all. If V8 compiling ever finishes for me locally, I'll try that out....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alas, it did not appear to fix the bug. IDs show up in destroy
without showing up in create
. But I should at least update the test to use HTTPINCOMINGMESSAGE.
Passes everywhere except when run in a worker (using not ok 186 parallel/test-async-hooks-http-parser-destroy
---
duration_ms: 5.423
severity: fail
exitcode: 1
stack: |-
events.js:173
throw er; // Unhandled 'error' event
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected ... Lines skipped
[
158,
...
487,
- 491,
- 495,
- 499,
- 503,
- 507
]
at process.checkOnExit (/home/iojs/build/workspace/node-test-commit-custom-suites-freestyle/test/parallel/test-async-hooks-http-parser-destroy.js:61:10)
at process.emit (events.js:201:15)
Emitted 'error' event at:
at Worker.[kOnErrorMessage] (internal/worker.js:161:10)
at Worker.[kOnMessage] (internal/worker.js:171:37)
at MessagePort.<anonymous> (internal/worker.js:104:57)
at MessagePort.emit (events.js:196:13)
at MessagePort.onmessage (internal/worker/io.js:68:8)
... |
Missing some |
Improve reporting in test-async-hooks-http-parser-destroy when failing. Before, failures looked like this (edited slightly to conform to our commit message 72-char line length restriction): The expression evaluated to a falsy value: assert.ok(destroyedIds.indexOf(createdAsyncId) >= 0) Now, you get a slightly better idea of what's up. (Is it missing one ID? More than one? All of them?): AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected ... Lines skipped [ 156, ... 757, - 761, 765 ]
Now that #26961 has landed, this can be unblocked/unstalled. I've rebased, removed the workaround for #26961, and I think this is ready to go? Re-reviews would be helpful. @addaleax @joyeecheung |
This comment has been minimized.
This comment has been minimized.
Argh! Still fails with |
OK, fixed for workers! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Landed in 11e1e00 |
Improve reporting in test-async-hooks-http-parser-destroy when failing. Before, failures looked like this (edited slightly to conform to our commit message 72-char line length restriction): The expression evaluated to a falsy value: assert.ok(destroyedIds.indexOf(createdAsyncId) >= 0) Now, you get a slightly better idea of what's up. (Is it missing one ID? More than one? All of them?): AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected ... Lines skipped [ 156, ... 757, - 761, 765 ] PR-URL: nodejs#27319 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Improve reporting in test-async-hooks-http-parser-destroy when failing. Before, failures looked like this (edited slightly to conform to our commit message 72-char line length restriction): The expression evaluated to a falsy value: assert.ok(destroyedIds.indexOf(createdAsyncId) >= 0) Now, you get a slightly better idea of what's up. (Is it missing one ID? More than one? All of them?): AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal: + actual - expected ... Lines skipped [ 156, ... 757, - 761, 765 ] PR-URL: #27319 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Improve reporting in test-async-hooks-http-parser-destroy when failing.
Before, failures looked like this (edited slightly to conform to our
commit message 72-char line length restriction):
Now, you get a slightly better idea of what's up. (Is it missing one ID?
More than one? All of them?):
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes