couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1135882 - in /couchdb/branches/1.0.x: ./ etc/default/couchdb share/www/script/couch_tests.js share/www/script/test/conflicts.js
Date Wed, 15 Jun 2011 01:01:55 GMT
Author: davisp
Date: Wed Jun 15 01:01:55 2011
New Revision: 1135882

URL: http://svn.apache.org/viewvc?rev=1135882&view=rev
Log:
Backport of 1128709 from trunk.

move COUCHDB-1178 test to conflicts.js


Modified:
    couchdb/branches/1.0.x/   (props changed)
    couchdb/branches/1.0.x/etc/default/couchdb   (props changed)
    couchdb/branches/1.0.x/share/www/script/couch_tests.js
    couchdb/branches/1.0.x/share/www/script/test/conflicts.js

Propchange: couchdb/branches/1.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 15 01:01:55 2011
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:984170,984178,984214,984228,984237,984241,984501,991073,1029025-1029026,1029030,1035447,1045203,1083714,1095557,1095581,1097300,1099479,1102006,1128703
+/couchdb/trunk:984170,984178,984214,984228,984237,984241,984501,991073,1029025-1029026,1029030,1035447,1045203,1083714,1095557,1095581,1097300,1099479,1102006,1128703,1128709

Propchange: couchdb/branches/1.0.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 15 01:01:55 2011
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:984170,984178,984214,984228,984237,984241,984501,991073,1029025-1029026,1029030,1035447,1045203,1083714,1095557,1095581,1097300,1099479,1102006,1128703
+/couchdb/trunk/etc/default/couchdb:984170,984178,984214,984228,984237,984241,984501,991073,1029025-1029026,1029030,1035447,1045203,1083714,1095557,1095581,1097300,1099479,1102006,1128703,1128709
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/1.0.x/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/couch_tests.js?rev=1135882&r1=1135881&r2=1135882&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/couch_tests.js [utf-8] (original)
+++ couchdb/branches/1.0.x/share/www/script/couch_tests.js [utf-8] Wed Jun 15 01:01:55 2011
@@ -73,7 +73,6 @@ loadTest("reduce.js");
 loadTest("reduce_builtin.js");
 loadTest("reduce_false.js");
 loadTest("reduce_false_temp.js");
-loadTest("regression.js");
 loadTest("replication.js");
 loadTest("rev_stemming.js");
 loadTest("rewrite.js");

Modified: couchdb/branches/1.0.x/share/www/script/test/conflicts.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/conflicts.js?rev=1135882&r1=1135881&r2=1135882&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/conflicts.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/conflicts.js Wed Jun 15 01:01:55 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