You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test-ttywrap.writestream.js test always passes #28304
In test/async-hooks/test-ttywrap.writestream.js, there is delayedOnCloseHandler() which is supposed to check the async-hooks graph. When I run directly with the node executable, the test fails. When run with tools/test.py, though, the test passes. On my computer, at least, I can change the contents of delayedOnCloseHandler() to anything. It can just be a throw statement. The test will fail as expected when run directly with node but will pass when run with tools/test.py.
First, can someone else confirm this so that we can label this with confirmed-bug (or find that they don't experience this behavior in which case I can look more closely at exactly what I'm doing wrong).
Second, does anyone know why this would be the case?
When run with tools/test.py, though, the test passes.
That’s because the test isn’t run in that case, I assume; it’s skip’ed when stdout does not refer to a TTY. (This also means that it should be in test/pseudo-tty if we keep it, probably.)
As for the failure, I assume the missing before/after hooks would have been corresponding to the .destroy() call. I think the test should have been updated when we started making ._destroy() for stdio streams throw an error, and later be a no-op; that was forever ago, so it’s quite possible that the test never worked (I didn’t check).
Activity
addaleax commentedon Jun 19, 2019
That’s because the test isn’t run in that case, I assume; it’s
skip’ed when stdout does not refer to a TTY. (This also means that it should be intest/pseudo-ttyif we keep it, probably.)As for the failure, I assume the missing before/after hooks would have been corresponding to the
.destroy()call. I think the test should have been updated when we started making._destroy()for stdio streams throw an error, and later be a no-op; that was forever ago, so it’s quite possible that the test never worked (I didn’t check).Tbh, I’d just remove the test file.
Trott commentedon Jun 20, 2019
I can get behind that: #28316
test: remove test-ttywrap.writestream.js
lpinca commentedon Jul 14, 2019
Closing as the test was removed in b448db3.