Merge remote branch 'cloudant:fix-views_tests'
This closes #220
Signed-off-by: Eric Avdey <eiri@eiri.ca>
diff --git a/test/couchdb_views_tests.erl b/test/couchdb_views_tests.erl
index 289ecb8..7b04e85 100644
--- a/test/couchdb_views_tests.erl
+++ b/test/couchdb_views_tests.erl
@@ -529,8 +529,9 @@
count_users(DbName) ->
{ok, Db} = couch_db:open_int(DbName, [?ADMIN_CTX]),
{monitored_by, Monitors} = erlang:process_info(Db#db.main_pid, monitored_by),
+ CouchFiles = [P || P <- Monitors, couch_file:process_info(P) =/= undefined],
ok = couch_db:close(Db),
- length(lists:usort(Monitors) -- [self()]).
+ length(lists:usort(Monitors) -- [self() | CouchFiles]).
count_index_files(DbName) ->
% call server to fetch the index files