summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2011-01-12 04:50:48 +0000
committerAdam Kocoloski <kocolosk@apache.org>2011-01-12 04:50:48 +0000
commite27bbbb380dc37d3b7a792636c2e10dea65b56d8 (patch)
tree6d8c819eb1a6139bd0c609fdb6566b7843bcb080 /share/www
parentca9457f28253fd151eb7d8800d33c8a715c520b0 (diff)
Preserve purge metadata during compaction, thanks Mike Leddy
Closes COUCHDB-1021 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1057987 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r--share/www/script/test/purge.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/www/script/test/purge.js b/share/www/script/test/purge.js
index af72ea4f..f8f45138 100644
--- a/share/www/script/test/purge.js
+++ b/share/www/script/test/purge.js
@@ -76,6 +76,14 @@ couchTests.purge = function(debug) {
}
T(db.view("test/single_doc").total_rows == 0);
+ // purge sequences are preserved after compaction (COUCHDB-1021)
+ T(db.compact().ok);
+ T(db.last_req.status == 202);
+ // compaction isn't instantaneous, loop until done
+ while (db.info().compact_running) {};
+ var compactInfo = db.info();
+ T(compactInfo.purge_seq == newInfo.purge_seq);
+
// purge documents twice in a row without loading views
// (causes full view rebuilds)