summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/retryable_writes_standalone_api.js
blob: 38c481248e4894d93ffc0e198fab7ad8f74ce4bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Verify behavior of retryable write commands on a standalone mongod.
 */
(function() {
"use strict";

const standalone = MongoRunner.runMongod();
const testDB = standalone.getDB("test");

// Commands sent to standalone nodes are not allowed to have transaction numbers.
assert.commandFailedWithCode(
    testDB.runCommand(
        {insert: "foo", documents: [{x: 1}], txnNumber: NumberLong(1), lsid: {id: UUID()}}),
    ErrorCodes.IllegalOperation,
    "expected command with transaction number to fail on standalone mongod");

MongoRunner.stopMongod(standalone);
}());