-
Notifications
You must be signed in to change notification settings - Fork 1.2k
CLI Daemon tests #1220
Comments
I believe the issues is actually this - https://stackoverflow.com/questions/23429499/stdout-buffer-issue-using-node-child-process, I've ran across it myself, the solution is to increase the buffer to something more reasonable - {maxBuffer: 1024 * 500}. I'm not sure I agree with this -
We want to run this tests as part of each CI run so we make sure it's not broken.
This was due to the fact it was only an issue with the daemon IIRC. But if we can run them as part of core, I think we should. |
Here are the actually docs on |
@dryajov sorry it's not a buffer size issue. The issue is that nothing is received until the daemon process stops. |
@richardschneider we're using https://www.npmjs.com/package/execa to spawn the process, which uses |
I think the confusion with this is because js-ipfs/test/utils/ipfs-exec.js Line 31 in ac95601
|
I believe this is being handled at #1103, do you confirm? |
From my side of things, I was looking specifically into this statement, which I didn't think was accurate - confirmed by my last two comments. As for the failures related to this, I'm not sure where they're being handled. |
All good now with latest ipfsd-ctl changes. Thank you both! ❤️ |
Three tests (Addresses.Swarm, SIGINT and SIGTERM) make the assumption that the daemon can be spawned and the process output can be read in real time. This is not true because node's
childProcess
buffers the output.What really happens, is the command timeout is detected by
execa
and the process is then killed and then the test gets the process output, which then tries to the kill process. Also the 1st killing of the process raises a Promise rejection that is unhandled and Node tells usThe SIGINT and SIGTERM tests really belong to
js-ipfsd-ctl
, see issue #1192Is the Addresses.Swarm test really needed? If so, shouldn't it be a
core
test?The text was updated successfully, but these errors were encountered: