blob: b9ba8813722b899d6927089b553da782e97fe878 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/**
* Tests that the 'prepareTransaction' command fails against a standalone node.
*
* @tags: [uses_transactions, uses_prepare_transaction]
*/
(function() {
"use strict";
const standalone = MongoRunner.runMongod();
const collName = "prepare_transaction_fails_on_standalone";
const dbName = "test";
const testDB = standalone.getDB(dbName);
assert.commandWorked(testDB.runCommand({create: collName}));
assert.commandFailedWithCode(testDB.adminCommand({prepareTransaction: 1}),
ErrorCodes.ReadConcernMajorityNotEnabled);
MongoRunner.stopMongod(standalone);
}());
|