Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwight committed Aug 3, 2010
1 parent 9701370 commit b21a7bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jstests/replsets/rollback2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
Expand All @@ -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) {
Expand Down

0 comments on commit b21a7bb

Please sign in to comment.