summaryrefslogtreecommitdiff
path: root/jstests/readonly/write_ops.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/readonly/write_ops.js')
-rw-r--r--jstests/readonly/write_ops.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/readonly/write_ops.js b/jstests/readonly/write_ops.js
index ca967e0189f..2a468c0360f 100644
--- a/jstests/readonly/write_ops.js
+++ b/jstests/readonly/write_ops.js
@@ -5,24 +5,24 @@ runReadOnlyTest(function() {
return {
name: 'write_ops',
load: function(writableCollection) {
- assert.commandWorked(writableCollection.insert({_id: 0, x: 1}));
+ assert.commandWorked(writableCollection.insert({_id: 0, x: 1}, {ordered: false}));
},
exec: function(readableCollection) {
// Test that insert fails.
assert.writeErrorWithCode(
- readableCollection.insert({x: 2}),
+ readableCollection.insert({x: 2}, {ordered: false}),
ErrorCodes.IllegalOperation,
"Expected insert to fail because database is in read-only mode");
// Test that delete fails.
assert.writeErrorWithCode(
- readableCollection.remove({x: 1}),
+ readableCollection.remove({x: 1}, {ordered: false}),
ErrorCodes.IllegalOperation,
"Expected remove to fail because database is in read-only mode");
// Test that update fails.
assert.writeErrorWithCode(
- readableCollection.update({_id: 0}, {$inc: {x: 1}}),
+ readableCollection.update({_id: 0}, {$inc: {x: 1}}, {ordered: false}),
ErrorCodes.IllegalOperation,
"Expected update to fail because database is in read-only mode");
}