From c63d078f876652088a1c3f344f716306f4a24043 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Tue, 22 Jul 2008 22:04:58 +0000 Subject: Fix for compacted databases reporting 0 documents after compaction git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@678923 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_tests.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'share') diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index c65e98b5..852f9cfe 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -1331,14 +1331,13 @@ var tests = { T(xhr.status == 202); // compaction isn't instantaneous, loop until done while (db.info().compact_running) {}; - + + restartServer(); var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt"); T(xhr.responseText == "This is a base64 encoded text") T(xhr.getResponseHeader("Content-Type") == "text/plain") - - var compactedsize = db.info().disk_size; - - T(compactedsize < deletesize); + T(db.info().doc_count == 1); + T(db.info().disk_size < deletesize); } }; -- cgit v1.2.3