This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch monitor-spawned-process-in-test in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 19861051de55510c28ced4fe67271cc072e4bdcd Author: Robert Newson <[email protected]> AuthorDate: Thu Jun 18 16:49:54 2026 +0100 monitor spawned process for crash in test --- .../test/eunit/couch_mrview_ddoc_updated_tests.erl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/couch_mrview/test/eunit/couch_mrview_ddoc_updated_tests.erl b/src/couch_mrview/test/eunit/couch_mrview_ddoc_updated_tests.erl index 756434892..5f280b4de 100644 --- a/src/couch_mrview/test/eunit/couch_mrview_ddoc_updated_tests.erl +++ b/src/couch_mrview/test/eunit/couch_mrview_ddoc_updated_tests.erl @@ -104,7 +104,7 @@ check_indexing_stops_on_ddoc_change(Db) -> % spawn a process for query Self = self(), - QPid = spawn(fun() -> + {QPid, MRef} = spawn_monitor(fun() -> {ok, Result} = couch_mrview:query_view( Db, <<"_design/bar">>, <<"baz">>, [] ), @@ -115,7 +115,15 @@ check_indexing_stops_on_ddoc_change(Db) -> {ok, _} = couch_db:update_doc(Db, DDocJson2, []), receive {QPid, Msg} -> - ?assertEqual(Msg, ddoc_updated) + ?assertEqual(Msg, ddoc_updated); + {'DOWN', MRef, process, QPid, Reason} -> + error( + {assertion_failed, [ + {module, ?MODULE}, + {line, ?LINE}, + {reason, Reason} + ]} + ) after ?TIMEOUT -> error( {assertion_failed, [
