From 0d97b041970929e7e56caa42ee8837cec92d2264 Mon Sep 17 00:00:00 2001 From: Moustafa Maher Date: Thu, 29 Apr 2021 01:19:06 +0000 Subject: SERVER-55703 Update getDefaultRWConcern --- jstests/replsets/speculative_transaction.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'jstests/replsets/speculative_transaction.js') diff --git a/jstests/replsets/speculative_transaction.js b/jstests/replsets/speculative_transaction.js index e138612dcd1..60cab2ac951 100644 --- a/jstests/replsets/speculative_transaction.js +++ b/jstests/replsets/speculative_transaction.js @@ -20,6 +20,9 @@ const primary = rst.getPrimary(); const secondary = rst.getSecondary(); var testDB = primary.getDB(dbName); const coll = testDB[collName]; +// The default WC is majority and stopServerReplication will prevent satisfying any majority writes. +assert.commandWorked(primary.adminCommand( + {setDefaultRWConcern: 1, defaultWriteConcern: {w: 1}, writeConcern: {w: "majority"}})); function runTest(sessionOptions) { testDB.runCommand({drop: collName, writeConcern: {w: "majority"}}); -- cgit v1.2.1