summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-08-03 13:10:43 -0400
committerDwight <dwight@10gen.com>2010-08-03 13:10:43 -0400
commitb21a7bbfddebd96575d6eebd8e45d20751b89d10 (patch)
treecba7a94ba9bc806694b8145c60a15b97272f56f8
parent9701370edf60e8864403a21e4fc357552e84ccd2 (diff)
downloadmongo-r1.5.8.tar.gz
testsr1.5.8
-rw-r--r--jstests/replsets/rollback2.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/replsets/rollback2.js b/jstests/replsets/rollback2.js
index f5db383dbae..6b182d98e12 100644
--- a/jstests/replsets/rollback2.js
+++ b/jstests/replsets/rollback2.js
@@ -60,6 +60,7 @@ function dbs_match(a, b) {
/* these writes will be initial data and replicate everywhere. */
function doInitialWrites(db) {
t = db.bar;
+ t.insert({ q:0});
t.insert({ q: 1, a: "foo" });
t.insert({ q: 2, a: "foo", x: 1 });
t.insert({ q: 3, bb: 9, a: "foo" });
@@ -79,13 +80,16 @@ function doItemsToRollBack(db) {
t.update({ q: 2 }, { q: 39, rb: true });
// rolling back a delete will involve reinserting the item(s)
- t.remove({q:1});
+ t.remove({ q: 1 });
+
+ t.update({ q: 0 }, { $inc: { y: 1} });
}
function doWritesToKeep2(db) {
t = db.bar;
t.insert({ txt: 'foo' });
t.remove({ q: 70 });
+ t.update({ q: 0 }, { $inc: { y: 33} });
}
function verify(db) {