summaryrefslogtreecommitdiff
path: root/test/etap
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2011-04-28 01:04:38 +0000
committerPaul Joseph Davis <davisp@apache.org>2011-04-28 01:04:38 +0000
commit742c29989b9f8b10f248596c02ccdd51e13134b1 (patch)
tree1db7d445af7821514cfd656cdbe4d0b9dc2ffe9a /test/etap
parent66c6654288a25aa42af274511c87a61ea86ce0e7 (diff)
Make test count for test/etap/200-*.t deterministic.
This is a backport of 1097300 from trunk. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1097301 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap')
-rwxr-xr-xtest/etap/200-view-group-no-db-leaks.t11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/etap/200-view-group-no-db-leaks.t b/test/etap/200-view-group-no-db-leaks.t
index 87181d84..bbfd0833 100755
--- a/test/etap/200-view-group-no-db-leaks.t
+++ b/test/etap/200-view-group-no-db-leaks.t
@@ -65,7 +65,7 @@ ddoc_name() -> <<"foo">>.
main(_) ->
test_util:init_code_path(),
- etap:plan(13),
+ etap:plan(11),
case (catch test()) of
ok ->
etap:end_tests();
@@ -132,7 +132,7 @@ compact_db() ->
wait_db_compact_done(10).
wait_db_compact_done(0) ->
- etap:is(true, false, "DB compaction didn't finish");
+ etap:bail("DB compaction failed to finish.");
wait_db_compact_done(N) ->
{ok, Db} = couch_db:open_int(test_db_name(), []),
ok = couch_db:close(Db),
@@ -149,14 +149,17 @@ compact_view_group() ->
wait_view_compact_done(10).
wait_view_compact_done(0) ->
- etap:is(true, false, "view group compaction didn't finish");
+ etap:bail("View group compaction failed to finish.");
wait_view_compact_done(N) ->
{ok, {{_, Code, _}, _Headers, Body}} = http:request(
get,
{db_url() ++ "/_design/" ++ binary_to_list(ddoc_name()) ++ "/_info", []},
[],
[{sync, true}]),
- etap:is(Code, 200, "got view group info"),
+ case Code of
+ 200 -> ok;
+ _ -> etap:bail("Invalid view group info.")
+ end,
{Info} = couch_util:json_decode(Body),
{IndexInfo} = couch_util:get_value(<<"view_index">>, Info),
CompactRunning = couch_util:get_value(<<"compact_running">>, IndexInfo),