summaryrefslogtreecommitdiff
path: root/share/www/script/test
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2011-01-12 04:55:16 +0000
committerAdam Kocoloski <kocolosk@apache.org>2011-01-12 04:55:16 +0000
commit43da5dcc08fd83b6255f14d7a97ea177018f07e6 (patch)
treed0debc36f5377664eafe55c81a83acf83f93b58b /share/www/script/test
parent2a3b0a8d47430053541a84a3eeacaaef505308b1 (diff)
Preserve purge metadata during compaction, thanks Mike Leddy
Closes COUCHDB-1021 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1057988 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test')
-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)