summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-03-05 15:24:57 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-03-05 15:24:57 +0000
commitbc80bcbf22a136d272c2a2dc2b4fdc1a046a2c32 (patch)
tree5d956f760d4800f414b1b509911b0d1148e5d161 /test
parentc91a533e432a3297dfc67049338c97f6c53daba6 (diff)
faster LRU test in 070-couch-db.t
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@919447 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rwxr-xr-xtest/etap/070-couch-db.t13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/etap/070-couch-db.t b/test/etap/070-couch-db.t
index bf20dc0a..4b14aba6 100755
--- a/test/etap/070-couch-db.t
+++ b/test/etap/070-couch-db.t
@@ -41,6 +41,7 @@ test() ->
etap:ok(not lists:member(<<"etap-test-db">>, AllDbs2),
"Database was deleted."),
+ gen_server:call(couch_server, {set_max_dbs_open, 3}),
MkDbName = fun(Int) -> list_to_binary("lru-" ++ integer_to_list(Int)) end,
lists:foreach(fun(Int) ->
@@ -51,24 +52,24 @@ test() ->
end,
{ok, Db} = couch_db:create(MkDbName(Int), []),
ok = couch_db:close(Db)
- end, lists:seq(1, 200)),
+ end, lists:seq(1, 6)),
{ok, AllDbs3} = couch_server:all_databases(),
NumCreated = lists:foldl(fun(Int, Acc) ->
true = lists:member(MkDbName(Int), AllDbs3),
Acc+1
- end, 0, lists:seq(1, 200)),
- etap:is(200, NumCreated, "Created all databases."),
+ end, 0, lists:seq(1, 6)),
+ etap:is(6, NumCreated, "Created all databases."),
lists:foreach(fun(Int) ->
ok = couch_server:delete(MkDbName(Int), [])
- end, lists:seq(1, 200)),
+ end, lists:seq(1, 6)),
{ok, AllDbs4} = couch_server:all_databases(),
NumDeleted = lists:foldl(fun(Int, Acc) ->
false = lists:member(MkDbName(Int), AllDbs4),
Acc+1
- end, 0, lists:seq(1, 200)),
- etap:is(200, NumDeleted, "Deleted all databases."),
+ end, 0, lists:seq(1, 6)),
+ etap:is(6, NumDeleted, "Deleted all databases."),
ok.