This is an automated email from the ASF dual-hosted git repository. vatamane pushed a commit to branch merge-3.4.3 in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 35ff33bbc84e73168ad00b3b43ff84dda9809636 Author: Nick Vatamaniuc <[email protected]> AuthorDate: Tue Feb 25 00:08:18 2025 -0500 Fix flaky cfile closing test In the test must wait for the file to close, since closing is asynchronous with respect to the process exit. --- src/couch/test/eunit/couch_cfile_tests.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/couch/test/eunit/couch_cfile_tests.erl b/src/couch/test/eunit/couch_cfile_tests.erl index 87c15310c..a82ef1c28 100644 --- a/src/couch/test/eunit/couch_cfile_tests.erl +++ b/src/couch/test/eunit/couch_cfile_tests.erl @@ -391,6 +391,8 @@ t_monitor_is_closing_file_handles(Path) -> {ok, CFd} = proc_run(Proc, couch_cfile, dup, [Fd]), ?assertEqual(eof, file:pread(CFd, 0, 1)), kill_proc(Proc), + % Make sure to wait until it's closed + test_util:wait_value(fun() -> file:pread(CFd, 0, 1) end, {error, einval}), ?assertEqual({error, einval}, file:pread(CFd, 0, 1)). t_concurrent_reads_512b(Path) ->
