summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2018-02-28 12:10:53 -0600
committerPaul J. Davis <paul.joseph.davis@gmail.com>2018-02-28 14:00:13 -0600
commitc67fcb750f903ba579dbba79d0749e6e52477411 (patch)
treedb5b34851c1cb8a77991814da4da186d26c6ba66
parent083239353e919e897b97e8a96ee07cb42ca4eccd (diff)
downloadcouchdb-jenkins-pre-pse-daemon-test.tar.gz
TMP - Now with more debug!jenkins-pre-pse-daemon-test
-rw-r--r--src/couch/test/couchdb_compaction_daemon_tests.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/couch/test/couchdb_compaction_daemon_tests.erl b/src/couch/test/couchdb_compaction_daemon_tests.erl
index 0d7a46862..4dd184664 100644
--- a/src/couch/test/couchdb_compaction_daemon_tests.erl
+++ b/src/couch/test/couchdb_compaction_daemon_tests.erl
@@ -21,6 +21,10 @@
[couch_db_updater, couch_mrview_compactor, couch_compaction_daemon]).
+log(Fmt, Args) ->
+ io:format(standard_error, Fmt, Args).
+
+
start() ->
Ctx = test_util:start_couch(),
ok = config:set("compaction_daemon", "check_interval", "3", false),
@@ -73,6 +77,8 @@ compaction_daemon_test_() ->
should_compact_by_default_rule(DbName) ->
{timeout, ?TIMEOUT_S, ?_test(begin
+ log("XKCD: I AM TEST!~n", []),
+
CompactionMonitor = spawn_compaction_monitor(DbName),
{_, DbFileSize} = get_db_frag(DbName),
@@ -93,6 +99,8 @@ should_compact_by_default_rule(DbName) ->
{DbFrag2, DbFileSize2} = get_db_frag(DbName),
{ViewFrag2, ViewFileSize2} = get_view_frag(DbName),
+ log("~nXKCD: ~p ~p ~p~n", [DbFileSize, DbFileSize2, DbFrag2]),
+
?assert(DbFrag2 < 70),
?assert(ViewFrag2 < 70),
@@ -195,6 +203,7 @@ get_db_frag(DbName) ->
couch_db:close(Db),
FileSize = get_size(file, Info),
DataSize = get_size(active, Info),
+ log("~nXKCD: ~p ~p ~w~n", [FileSize, DataSize, Info]),
{round((FileSize - DataSize) / FileSize * 100), FileSize}.
get_view_frag(DbName) ->