You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/04/29 22:58:29 UTC
couchdb commit: updated refs/heads/1.6.x to 9f65fbe
Repository: couchdb
Updated Branches:
refs/heads/1.6.x cf3e19f88 -> 9f65fbe8c
Fix race condition in test suite on checking ref count
The issue happened from time to time on CentOS system: one, two or few
tests failed because ref count wasn't decremented till the very moment
when this value was requested and the result returned back. Adding
sleep timeout helps to synchronise calls and while 0.1 sec sleep is
good, but not enough - with 0.2 sleep floating errors happens no more.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9f65fbe8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9f65fbe8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9f65fbe8
Branch: refs/heads/1.6.x
Commit: 9f65fbe8ca5203483001b78ff2612879f4fa9e3c
Parents: cf3e19f
Author: Alexander Shorin <kx...@apache.org>
Authored: Wed Apr 30 00:11:41 2014 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Wed Apr 30 00:58:13 2014 +0400
----------------------------------------------------------------------
test/etap/200-view-group-no-db-leaks.t | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/9f65fbe8/test/etap/200-view-group-no-db-leaks.t
----------------------------------------------------------------------
diff --git a/test/etap/200-view-group-no-db-leaks.t b/test/etap/200-view-group-no-db-leaks.t
index b711ac8..9583d09 100755
--- a/test/etap/200-view-group-no-db-leaks.t
+++ b/test/etap/200-view-group-no-db-leaks.t
@@ -212,6 +212,7 @@ get_db_ref_counter() ->
check_db_ref_count() ->
{ok, #db{fd_ref_counter = Ref} = Db} = couch_db:open_int(test_db_name(), []),
ok = couch_db:close(Db),
+ timer:sleep(200), % sleep a bit to prevent race condition
etap:is(couch_ref_counter:count(Ref), 2,
"DB ref counter is only held by couch_db and couch_db_updater"),
ok.