summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@gmail.com>2023-04-26 16:08:19 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2023-04-26 17:29:14 -0400
commite6dcf443f6cf996f07ff2e1be137afc33d9c77d4 (patch)
tree1b0801d1661c2a5b30c51fc5dd649cc249ccc8a8
parente4bc2b51c7ceb19a5915799f682343a0b1d8e734 (diff)
downloadcouchdb-e6dcf443f6cf996f07ff2e1be137afc33d9c77d4.tar.gz
Noticed the new internal error couchjs test was flaky
It's designed to crash and exit but depending when it does it exactly it may generate different errors. Add a few more clauses. Hopefully we don't have to completely remove it or comment it out.
-rw-r--r--src/couch/test/eunit/couch_js_tests.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/couch/test/eunit/couch_js_tests.erl b/src/couch/test/eunit/couch_js_tests.erl
index afd42bb72..09cab59a5 100644
--- a/src/couch/test/eunit/couch_js_tests.erl
+++ b/src/couch/test/eunit/couch_js_tests.erl
@@ -265,6 +265,12 @@ should_exit_on_internal_error() ->
% emits an error log before dying
throw:{<<"InternalError">>, _} ->
ok;
+ % gen_server may die before replying
+ exit:{noproc, {gen_server,call, _}} ->
+ ok;
+ % or it may die with an epipe if it crashes while we send/recv data to it
+ exit:{epipe, {gen_server, call, _}} ->
+ ok;
% It may fail and just exit the process. That's expected as well
throw:{os_process_error, _} ->
ok