Replies: 2 comments 1 reply
-
I should also note that regardless of whether or not this error happens, the output window still seems to have all the output from the |
Beta Was this translation helpful? Give feedback.
-
That's exactly the goal 😄 As you said, this is a tough one to debug but my best guess would be the file is being closed before the final write happens. This is happening because the writes are done asynchronously. I've pushed a change that should address this so please let me know if you still see this behaviour with the latest neotest commit |
Beta Was this translation helpful? Give feedback.
-
I have a custom adapter for
pytest
that is somewhat ripped fromneotest-python
, but runs the tests in a container and redirects the output to the host filesystem where it can be parsed (--junitxml
provides the results, while output fromdocker exec
is just dumped directly to STD{OUT,ERR} as expected).Occasionally, I run into the following issue:
but I'm not entirely sure what it means. Looking at the code:
We are creating a temporary file, opening it to clear its content and then writing data from the subprocess that is spawned to this file. Is the general goal here to just capture all output from the process so it can be displayed?
I understand that this is largely impossible to debug from a third party because you don't have a lot of insight into my weird setup, but I am mainly trying to understand what the high level goal of this code is so I can understand where things start to go wrong.
Doing a bit of "debugging", the file that gets created is as expected
output_path=/tmp/nvim.amasquelier/hjowwP/3
. It seems that at some point that file handle goes bad between when it is created and when it is accessed (asynchronously?) later on? If I do something likecat /tmp/nvim.amasquelier/hjowwP/3
to look at the specific file, orls /tmp/nvim.amasquelier/hjowwP
to look at all temporary files, they are all just fine from these commands in the shell. This implies the file is just fine, but something has gone wrong with the file descriptor that has causes this issue.Any ideas how to troubleshoot what exactly is going wrong with Neotest and its file descriptor @rcarriga? I don't see that anyone else has reported a similar issue.
It is not consistent whether or not is happens either - here is 4 runs, and it only happened on the first (it is not consistently the first run either):
Beta Was this translation helpful? Give feedback.
All reactions