summaryrefslogtreecommitdiff
path: root/test/etap
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-11-19 01:38:41 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-11-19 01:38:41 +0000
commit1074767a6b2a254fc6abcb08ec8ccc156e5aa6e9 (patch)
tree5b7701295e50f1f795011b441f483b77b7ccbadf /test/etap
parent8c607abe413839f428a6a7209aab385b0fa22308 (diff)
Make sure that after a local database compaction the old database reference counters don't get unreleased forever because of a
continuous (or long) replication is going on. Same type of issue as in COUCHDB-926. Thanks Adam Kocoloski for some suggestions. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1036705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap')
-rwxr-xr-xtest/etap/112-replication-missing-revs.t19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/etap/112-replication-missing-revs.t b/test/etap/112-replication-missing-revs.t
index 750334b9..71971088 100755
--- a/test/etap/112-replication-missing-revs.t
+++ b/test/etap/112-replication-missing-revs.t
@@ -188,8 +188,21 @@ start_changes_feed(remote, Since, Continuous) ->
Db = #http_db{url = "http://127.0.0.1:5984/etap-test-source/"},
couch_rep_changes_feed:start_link(self(), Db, Since, Props).
+couch_rep_pid(Db) ->
+ spawn(fun() -> couch_rep_pid_loop(Db) end).
+
+couch_rep_pid_loop(Db) ->
+ receive
+ {'$gen_call', From, get_target_db} ->
+ gen_server:reply(From, {ok, Db})
+ end,
+ couch_rep_pid_loop(Db).
+
start_missing_revs(local, Changes) ->
- couch_rep_missing_revs:start_link(self(), get_db(target), Changes, []);
+ TargetDb = get_db(target),
+ MainPid = couch_rep_pid(TargetDb),
+ couch_rep_missing_revs:start_link(MainPid, TargetDb, Changes, []);
start_missing_revs(remote, Changes) ->
- Db = #http_db{url = "http://127.0.0.1:5984/etap-test-target/"},
- couch_rep_missing_revs:start_link(self(), Db, Changes, []).
+ TargetDb = #http_db{url = "http://127.0.0.1:5984/etap-test-target/"},
+ MainPid = couch_rep_pid(TargetDb),
+ couch_rep_missing_revs:start_link(MainPid, TargetDb, Changes, []).