Closed HeartANDu closed 2 weeks ago
Sorry I'm not clear on what the exact issue here is. Can you explain why waiting for the stream to be closed fixes your problem?
I'm not sure why that happens in particular, but as the async task writes the command output to a temporary file, it sometimes doesn't write the whole output. Since the output of the test command is JSON encoded, decoding of the result breaks. That's why I added waiting for the stream, and decoding doesn't break anymore.
Thanks for the MR but I'm not going to merge this as it'll mean that the process output won't be visible while it's running which is not acceptable.
This is a bug in the strategy in that it doesn't wait for all of the output before returning but the fix will need a bit of fiddling. Feel free to open an issue
When I ran Golang tests for a whole suite (or for a file), I often encountered that either the plugin hung up or (if using
neotest-golang
) I was getting the error message:Turns out, that output of commands running in the background sometimes breaks due to not writing the whole thing. I added an option to use buffered output when running commands, so no output is lost when written to a temporary file.