You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2021/09/03 21:18:38 UTC
[couchdb] branch chewbranca-ioq-experiments-rebase updated: Fix
couch_mrview tests
This is an automated email from the ASF dual-hosted git repository.
chewbranca pushed a commit to branch chewbranca-ioq-experiments-rebase
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/chewbranca-ioq-experiments-rebase by this push:
new 5ce3066 Fix couch_mrview tests
5ce3066 is described below
commit 5ce3066d3c626fdf86ef54d2fcd965bc3132e4c5
Author: Russell Branca <ch...@apache.org>
AuthorDate: Fri Sep 3 14:16:44 2021 -0700
Fix couch_mrview tests
---
src/couch_mrview/src/couch_mrview_compactor.erl | 5 +++--
src/couch_mrview/src/couch_mrview_index.erl | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/couch_mrview/src/couch_mrview_compactor.erl b/src/couch_mrview/src/couch_mrview_compactor.erl
index a28967c..f6b5e11 100644
--- a/src/couch_mrview/src/couch_mrview_compactor.erl
+++ b/src/couch_mrview/src/couch_mrview_compactor.erl
@@ -14,6 +14,7 @@
-include_lib("couch/include/couch_db.hrl").
-include_lib("couch_mrview/include/couch_mrview.hrl").
+-include_lib("ioq/include/ioq.hrl").
-export([compact/3, swap_compacted/2, remove_compacted/1]).
@@ -274,7 +275,7 @@ recompact_success_after_progress() ->
timer:sleep(100),
exit({updated, self(), State#mrst{update_seq = 2}})
end),
- State = #mrst{fd=self(), update_seq=0},
+ State = #mrst{fd=#ioq_file{fd=self()}, update_seq=0},
?assertEqual({ok, State#mrst{update_seq = 2}}, recompact(State))
end).
@@ -285,7 +286,7 @@ recompact_exceeded_retry_count() ->
exit(error)
end),
ok = meck:expect(couch_log, warning, fun(_, _) -> ok end),
- State = #mrst{fd=self(), db_name=foo, idx_name=bar},
+ State = #mrst{fd=#ioq_file{fd=self()}, db_name=foo, idx_name=bar},
ExpectedError = {exceeded_recompact_retry_count,
[{db_name, foo}, {idx_name, bar}]},
?assertError(ExpectedError, recompact(State))
diff --git a/src/couch_mrview/src/couch_mrview_index.erl b/src/couch_mrview/src/couch_mrview_index.erl
index 68f1d23..582595c 100644
--- a/src/couch_mrview/src/couch_mrview_index.erl
+++ b/src/couch_mrview/src/couch_mrview_index.erl
@@ -165,7 +165,7 @@ close(State) ->
% outstanding queries are done.
shutdown(State) ->
erlang:demonitor(State#mrst.fd_monitor, [flush]),
- unlink(State#mrst.fd).
+ unlink(ioq:fd_pid(State#mrst.fd)).
delete(#mrst{db_name=DbName, sig=Sig}=State) ->