blob: e24fea467c474fc1c9d75e31ef61e1624a2ad7dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Ensures db eval does not crash when attempt is made to wait on a replicated read/write concern
(function() {
'use strict';
// Read concern
var findCommand = {find: 'readMajority', batchSize: 2, readConcern: {level: 'majority'}};
db.runCommand({'eval': 'db.runCommand(' + tojson(findCommand) + ')'});
// Write concern
var insertCommand = {
insert: 'writeConcern',
documents: [{TestKey: 'TestValue'}],
writeConcern: {w: 'majority', wtimeout: 30000}
};
db.runCommand({'eval': 'db.runCommand(' + tojson(insertCommand) + ')'});
})();
|