This is an automated email from the ASF dual-hosted git repository.
nickva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new e7098a281 monitor spawned process for crash in test
e7098a281 is described below
commit e7098a281762e524b9a7172e7240fe1c1b9f49cc
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, [