golemfactory / golem-js

TypeScript + NodeJS API for Golem
https://docs.golem.network/docs/creators/javascript
GNU Lesser General Public License v3.0
29 stars 16 forks source link

test: changed the way of reacting to the end of the test and adding timeout clearing #1076

Open mgordel opened 2 weeks ago

mgordel commented 2 weeks ago

With these changes, looped tests for 6 hours did not cause any errors. The only difference is in the way of listening for the end of the spawned process. onClose waits for the bound stdio to end. onExit does not wait for the stdio to close. Perhaps in some unspecified cases stdio are not closed and despite the process ending we do not react to it. Additionally, I added clearing the timeout.