apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.26k stars 1.03k forks source link

EUnit tests on windows opens a bunch of terminals then closes them #5246

Closed nickva closed 1 month ago

nickva commented 2 months ago

Both @big-r81 and I noticed when running make eunit apps=couch on Windows about a dozen terminal windows are spawned and then closed after about 10 seconds.

@big-r81 figured it out it's from opening "sleep.exe" commands. By default windows will spawn a terminal for those. We need to use the hide option in open_port to prevent it.

https://github.com/apache/couchdb/blob/5d4f3a323dfc1127d50741eda565184a2e5d57c6/src/couch/src/couch_debug.erl#L1127

nickva commented 2 months ago

While looking at that test in the couch_debug module. There is likely another issue with it, where it doesn't cleanup properly its process tree:

https://github.com/apache/couchdb/blob/5d4f3a323dfc1127d50741eda565184a2e5d57c6/src/couch/src/couch_debug.erl#L1150

exit(Pid, normal) is a no-op effectively, so that leaves a bunch of processes around

nickva commented 1 month ago

These should be fixed now