mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-19206 fix jstests/replsets/read_committed.js
This commit is contained in:
parent
917e419759
commit
9c63b79a8d
@ -42,7 +42,7 @@ function doCommittedRead() {
|
||||
}
|
||||
|
||||
// Do a write, wait for it to replicate, and ensure it is visible.
|
||||
assert.writeOK(t.save({_id: 1, state: 0}, {writeConcern: {w: 2, wtimeout: 60*1000}}));
|
||||
assert.writeOK(t.save({_id: 1, state: 0}, {writeConcern: {w: "majority", wtimeout: 60*1000}}));
|
||||
assert.eq(doDirtyRead(), 0);
|
||||
assert.eq(doCommittedRead(), 0);
|
||||
|
||||
@ -60,7 +60,7 @@ assert.eq(doCommittedRead(), 0);
|
||||
|
||||
// Restart the node and ensure the committed view is updated.
|
||||
replTest.restart(slaveId);
|
||||
db.getLastError(2, 60*1000);
|
||||
db.getLastError("majority", 60*1000);
|
||||
assert.eq(doDirtyRead(), 1);
|
||||
assert.eq(doCommittedRead(), 1);
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user