Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On MacOS runner this test can be flaky. On slower workers StreamPid would usually be killed by the time we check is_process_alive/1, however on MacOS it has failed at least once with: ``` module 'couch_stream_tests' CouchDB stream tests couch_stream_tests:124: -should_stop_on_normal_exit_of_stream_opener/1-fun-3-...*failed* in function couch_stream_tests:'-should_stop_on_normal_exit_of_stream_opener/1-fun-3-'/1 (test/eunit/couch_stream_tests.erl, line 124) in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) [...] **error:{assert,[{module,couch_stream_tests}, {line,124}, {expression,"not ( is_process_alive ( StreamPid ) )"}, {expected,true}, {value,false}]} ``` To fix it, ensure we wait for the process to die before asserting it's dead. It's a bit redundant to assert it's gone, but we leave that in the test mostly to make it obvious what we're after. If the process refuses to die the test will most likely fail a timeout. While we're at it, modernize the test suite to use the standard `?TDEF_FE` macros. In some cases we were running the test code in the setup phase instead of the test itself (`_assert...` vs `assert...` calls), so this should fix that as well.
- Loading branch information