From 7604dad6da718751ad1f04bae1c839e87a1f8651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Jos=C3=A9=20Grillo=20Ram=C3=ADrez?= Date: Wed, 8 Jan 2020 13:40:24 +0000 Subject: SERVER-44598 Shards do not treat the IGNORED version as "intended sharded" --- jstests/readonly/write_ops.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'jstests/readonly') 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"); } -- cgit v1.2.1