summaryrefslogtreecommitdiff
path: root/jstests/readonly
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@10gen.com>2020-01-08 13:40:24 +0000
committerevergreen <evergreen@mongodb.com>2020-01-08 13:40:24 +0000
commit7604dad6da718751ad1f04bae1c839e87a1f8651 (patch)
treeb6faa83f091654734f2be451ed673aca845247d5 /jstests/readonly
parent7b9cc569b327f2b396ddd10f6c1428ab36d4bf07 (diff)
downloadmongo-7604dad6da718751ad1f04bae1c839e87a1f8651.tar.gz
SERVER-44598 Shards do not treat the IGNORED version as "intended sharded"
Diffstat (limited to 'jstests/readonly')
-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");
}