summaryrefslogtreecommitdiff
path: root/jstests/replsets/kill_sessions_with_prepared_transaction.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/kill_sessions_with_prepared_transaction.js')
-rw-r--r--jstests/replsets/kill_sessions_with_prepared_transaction.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/replsets/kill_sessions_with_prepared_transaction.js b/jstests/replsets/kill_sessions_with_prepared_transaction.js
index a9d32dc73e9..4fe666412e8 100644
--- a/jstests/replsets/kill_sessions_with_prepared_transaction.js
+++ b/jstests/replsets/kill_sessions_with_prepared_transaction.js
@@ -18,7 +18,7 @@ const primary = rst.getPrimary();
const primaryDB = primary.getDB(dbName);
// Create a collection.
-assert.commandWorked(primaryDB.createCollection(collName));
+assert.commandWorked(primaryDB.runCommand({create: collName, writeConcern: {w: "majority"}}));
const session = primary.startSession();
const sessionDb = session.getDatabase(dbName);