couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r1128708 - in /couchdb/branches/1.1.x/share/www/script: couch_tests.js test/conflicts.js
Date Sat, 28 May 2011 17:05:33 GMT
Author: rnewson
Date: Sat May 28 17:05:33 2011
New Revision: 1128708

URL: http://svn.apache.org/viewvc?rev=1128708&view=rev
Log:
move COUCHDB-1178 test to conflicts.js

Modified:
    couchdb/branches/1.1.x/share/www/script/couch_tests.js
    couchdb/branches/1.1.x/share/www/script/test/conflicts.js

Modified: couchdb/branches/1.1.x/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/share/www/script/couch_tests.js?rev=1128708&r1=1128707&r2=1128708&view=diff
==============================================================================
--- couchdb/branches/1.1.x/share/www/script/couch_tests.js [utf-8] (original)
+++ couchdb/branches/1.1.x/share/www/script/couch_tests.js [utf-8] Sat May 28 17:05:33 2011
@@ -76,7 +76,6 @@ loadTest("reduce.js");
 loadTest("reduce_builtin.js");
 loadTest("reduce_false.js");
 loadTest("reduce_false_temp.js");
-loadTest("regression.js");
 loadTest("replication.js");
 loadTest("replicator_db.js");
 loadTest("rev_stemming.js");

Modified: couchdb/branches/1.1.x/share/www/script/test/conflicts.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/share/www/script/test/conflicts.js?rev=1128708&r1=1128707&r2=1128708&view=diff
==============================================================================
--- couchdb/branches/1.1.x/share/www/script/test/conflicts.js (original)
+++ couchdb/branches/1.1.x/share/www/script/test/conflicts.js Sat May 28 17:05:33 2011
@@ -61,4 +61,29 @@ couchTests.conflicts = function(debug) {
 
   T(db.save(doc2).ok);  // we can save a new document over a deletion without
                         // knowing the deletion rev.
+
+  // Verify COUCHDB-1178
+  var r1 = {"_id":"doc","foo":"bar"};
+  var r2 = {"_id":"doc","foo":"baz","_rev":"1-4c6114c65e295552ab1019e2b046b10e"};
+  var r3 = {"_id":"doc","foo":"bam","_rev":"2-cfcd6781f13994bde69a1c3320bfdadb"};
+  var r4 = {"_id":"doc","foo":"bat","_rev":"3-cc2f3210d779aef595cd4738be0ef8ff"};
+
+  T(db.save({"_id":"_design/couchdb-1178","validate_doc_update":"function(){}"}).ok);
+  T(db.save(r1).ok);
+  T(db.save(r2).ok);
+  T(db.save(r3).ok);
+
+  T(db.compact().ok);
+  while (db.info().compact_running) {};
+
+  TEquals({"_id":"doc",
+        "_rev":"3-cc2f3210d779aef595cd4738be0ef8ff",
+        "foo":"bam",
+        "_revisions":{"start":3,
+          "ids":["cc2f3210d779aef595cd4738be0ef8ff",
+                 "cfcd6781f13994bde69a1c3320bfdadb",
+                                      "4c6114c65e295552ab1019e2b046b10e"]}},
+    db.open("doc", {"revs": true}));
+  TEquals([], db.bulkSave([r4, r3, r2], {"new_edits":false}), "no failures");
+
 };



Mime
View raw message