-
Notifications
You must be signed in to change notification settings - Fork 39
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
JUnit output incomplete, truncated at ^2kB boundary #138
Comments
I would expect that everything is flushed when the procress exits even if we forget to flush when we should? |
There's some discussion of a similar bug here – and the root cause seems to be that Node does not flush |
Ouch that is nasty paper cut in node. Here is a list of all the places the test-runner exits: PR that adds |
Or there is the following recomendation here nodejs/node#6456 [process.stdout, process.stderr].forEach((s) => {
s && s.isTTY && s._handle && s._handle.setBlocking &&
s._handle.setBlocking(true)
}) |
Interesting that this checks for a TTY. This is what the set-blocking package does too, which is mentioned in node-test-runner's package-lock.json – though I can't find any uses of it. Anyway, this issue is about behavior when writing to a pipe, not an interactive terminal, so I don't think that code snippet as is, or the set-blocking package, would resolve this bug. One possible solution might be to call If calling (Aside: should I refile this issue against node-test-runner? I always forget about the split between this package and that.) |
Running
elm-test
and redirecting to a file works as expected:Piping via another process results in a truncated output file:
Observed on macOS (truncates at 64kB) and Linux (truncates at 128kB).
Just a guess, but I suspect there's a missing
flush
somewhere.The text was updated successfully, but these errors were encountered: