-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
tap intermittently fails 1 test #422
tap intermittently fails 1 test #422
Comments
downgrading to [email protected] fixed the problem for me. This issue started in 11.0 and up. |
false alarm, it's still broken on 10.7.3. I apparently when I ran it I had 20 successes in a row by chance, then it failed on travis-ci the 21st time. forehead slap |
Can you run the test with It looks like the problem is that your program is ending without finishing the test, or not flushing all the output, resulting in a truncated TAP stream. |
here's a build failing on travis with https://travis-ci.org/mreinstein/reliable.io.js/builds/341762990 |
Ok, so, yeah, as I suspected, the process is just exiting without that test being finished.
I'm not sure why it's not erroring more usefully though. Is it possible that the program is calling |
I've grepped the code and don't see |
Ok, yeah, there's definitely something odd going on here. Simpler repro case: const t = require('tap')
t.test('numbers', t => {
for (let i = 0; i < 2000; i++) {
t.pass('a number is ' + i.toLocaleString())
}
t.end()
}) I'll keep digging. Thanks for finding this! |
I'm just glad it wasn't something obvious and stupid on my part. I'm frequently terrified when opening issues in any tracker. :0 |
Thanks, bisect. Thanks a lot. Super helpful there. Ok, I continue to dig.
|
wow that's surprisingly far back in the commit history |
Thanks! That was a satisfying bug to track down. Not obvious at all, until I read through the ee2cc44 commit. For anyone following along at home, note that |
awesome! I wonder if this was impacting other people as well, and might reduce the number of false postive test failures across the whole npm ecosystem. thanks for the fix! 🥇 👍 |
When I invoke my test manually from the command line à la
node test/sequence-buffer.js
, The tap output consistently indicates success on all tests.When I run my tests via
./node_modules/.bin/tap test
I intermittently get this error:
Different runs also produce a different number of asserts that are run:
And then other times, the tests all pass. Mostly failure though. Is this a race condition?
The text was updated successfully, but these errors were encountered: