couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r756953 - /couchdb/trunk/share/www/script/test/bulk_docs.js
Date Sat, 21 Mar 2009 14:42:45 GMT
Author: jchris
Date: Sat Mar 21 14:42:44 2009
New Revision: 756953

URL: http://svn.apache.org/viewvc?rev=756953&view=rev
Log:
regression test for update/delete in one bulk_docs update
closes COUCHDB-172

Modified:
    couchdb/trunk/share/www/script/test/bulk_docs.js

Modified: couchdb/trunk/share/www/script/test/bulk_docs.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/bulk_docs.js?rev=756953&r1=756952&r2=756953&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/bulk_docs.js (original)
+++ couchdb/trunk/share/www/script/test/bulk_docs.js Sat Mar 21 14:42:44 2009
@@ -88,4 +88,13 @@
 
   T(results[0].id != "");
   T(results[0].rev != "");
+  
+  
+  // Regression test for failure on update/delete
+  var newdoc = {"_id": "foobar", "body": "baz"};
+  T(db.save(newdoc).ok);
+  update = {"_id": newdoc._id, "_rev": newdoc._rev, "body": "blam"};
+  torem = {"_id": newdoc._id, "_rev": newdoc._rev, "_deleted": true};
+  results = db.bulkSave([update, torem]);
+  T(results[1].error == "conflict");
 };



Mime
View raw message