diff options
author | Jan Lehnardt <jan@apache.org> | 2012-03-12 19:16:25 +0100 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2012-03-12 19:16:25 +0100 |
commit | 623e4950e840b9083666c43053cb6e11a71078c5 (patch) | |
tree | 52258a66af4a8bcb6ef9182a9ed09cc137bf1bbf | |
parent | 45a7dcdb12b816ebc75d73ad7d39aa14e9393a5a (diff) | |
download | couchdb-623e4950e840b9083666c43053cb6e11a71078c5.tar.gz |
Fix very slow test test/etap/220-compaction-daemon.t
After the recent change in the view updater that ensures
the view updater's writer process collects larger batches
of map values to write into the index, the test's desired
fragmentation of 70% takes much more time to happen.
To fix this, simply decreased the target fragmentation.
(patch by Filipe)
-rwxr-xr-x | test/etap/220-compaction-daemon.t | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/etap/220-compaction-daemon.t b/test/etap/220-compaction-daemon.t index 116d65fb3..a241dbc07 100755 --- a/test/etap/220-compaction-daemon.t +++ b/test/etap/220-compaction-daemon.t @@ -48,7 +48,7 @@ test() -> add_design_doc(Db), couch_db:close(Db), - populate(70, 70, 200 * 1024), + populate(50, 20, 100 * 1024), {_, DbFileSize} = get_db_frag(), {_, ViewFileSize} = get_view_frag(), @@ -59,7 +59,7 @@ test() -> ok = couch_config:set( "compactions", binary_to_list(test_db_name()), - "[{db_fragmentation, \"70%\"}, {view_fragmentation, \"70%\"}]", + "[{db_fragmentation, \"50%\"}, {view_fragmentation, \"20%\"}]", false), ok = timer:sleep(4000), % something >= check_interval @@ -68,33 +68,33 @@ test() -> {DbFrag2, DbFileSize2} = get_db_frag(), {ViewFrag2, ViewFileSize2} = get_view_frag(), - etap:is(true, (DbFrag2 < 70), "Database fragmentation is < 70% after compaction"), - etap:is(true, (ViewFrag2 < 70), "View fragmentation is < 70% after compaction"), + etap:is(true, (DbFrag2 < 50), "Database fragmentation is < 50% after compaction"), + etap:is(true, (ViewFrag2 < 20), "View fragmentation is < 20% after compaction"), etap:is(true, (DbFileSize2 < DbFileSize), "Database file size decreased"), etap:is(true, (ViewFileSize2 < ViewFileSize), "View file size decreased"), disable_compact_daemon(), ok = timer:sleep(6000), % 2 times check_interval etap:is(couch_db:is_idle(Db), true, "Database is idle"), - populate(70, 70, 200 * 1024), - {_, DbFileSize3} = get_db_frag(), - {_, ViewFileSize3} = get_view_frag(), + populate(50, 20, 100 * 1024), + {_DbFrag3, DbFileSize3} = get_db_frag(), + {_ViewFrag3, ViewFileSize3} = get_view_frag(), % enable automatic compaction ok = couch_config:set( "compactions", "_default", - "[{db_fragmentation, \"70%\"}, {view_fragmentation, \"70%\"}]", + "[{db_fragmentation, \"50%\"}, {view_fragmentation, \"20%\"}]", false), - ok = timer:sleep(4000), % something >= check_interval + ok = timer:sleep(6000), % something >= check_interval wait_compaction_finished(), {DbFrag4, DbFileSize4} = get_db_frag(), {ViewFrag4, ViewFileSize4} = get_view_frag(), - etap:is(true, (DbFrag4 < 70), "Database fragmentation is < 70% after compaction"), - etap:is(true, (ViewFrag4 < 70), "View fragmentation is < 70% after compaction"), + etap:is(true, (DbFrag4 < 50), "Database fragmentation is < 50% after compaction"), + etap:is(true, (ViewFrag4 < 20), "View fragmentation is < 20% after compaction"), etap:is(true, (DbFileSize4 < DbFileSize3), "Database file size decreased again"), etap:is(true, (ViewFileSize4 < ViewFileSize3), "View file size decreased again"), |