diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:20:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-27 11:02:23 -0400 |
commit | 134a4083953270e8a11430395357fb70a29047ad (patch) | |
tree | dd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /jstests/libs/txns | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/libs/txns')
-rw-r--r-- | jstests/libs/txns/txn_passthrough_runner.js | 18 | ||||
-rw-r--r-- | jstests/libs/txns/txn_passthrough_runner_selftest.js | 41 |
2 files changed, 29 insertions, 30 deletions
diff --git a/jstests/libs/txns/txn_passthrough_runner.js b/jstests/libs/txns/txn_passthrough_runner.js index 1e2640cd11b..43d1ecf6575 100644 --- a/jstests/libs/txns/txn_passthrough_runner.js +++ b/jstests/libs/txns/txn_passthrough_runner.js @@ -1,13 +1,13 @@ (function() { - 'use strict'; +'use strict'; - const testFile = TestData.multiStmtTxnTestFile; +const testFile = TestData.multiStmtTxnTestFile; - try { - load(testFile); - } finally { - // Run a lightweight command to allow the override file to commit the last command. - // Ensure this command runs even if the test errors. - assert.commandWorked(db.runCommand({ping: 1})); - } +try { + load(testFile); +} finally { + // Run a lightweight command to allow the override file to commit the last command. + // Ensure this command runs even if the test errors. + assert.commandWorked(db.runCommand({ping: 1})); +} })(); diff --git a/jstests/libs/txns/txn_passthrough_runner_selftest.js b/jstests/libs/txns/txn_passthrough_runner_selftest.js index 86308f45188..b7836315b59 100644 --- a/jstests/libs/txns/txn_passthrough_runner_selftest.js +++ b/jstests/libs/txns/txn_passthrough_runner_selftest.js @@ -2,32 +2,31 @@ // check that operation is not visible immediately, but is visible after the transaction commits. (function() { - 'use strict'; +'use strict'; - const testName = jsTest.name(); +const testName = jsTest.name(); - // Use a unique db for every test so burn_in_tests can run this test multiple times. - db = db.getSiblingDB('txn_self_test' + Random.srand()); +// Use a unique db for every test so burn_in_tests can run this test multiple times. +db = db.getSiblingDB('txn_self_test' + Random.srand()); - // Profile all commands. - db.setProfilingLevel(2); +// Profile all commands. +db.setProfilingLevel(2); - const coll = db[testName]; +const coll = db[testName]; - assert.commandWorked(coll.insert({x: 1})); - let commands = db.system.profile.find().toArray(); - // Check that the insert is not visible because the txn has not committed. - assert.eq(commands.length, 1); - assert.eq(commands[0].command.create, testName); +assert.commandWorked(coll.insert({x: 1})); +let commands = db.system.profile.find().toArray(); +// Check that the insert is not visible because the txn has not committed. +assert.eq(commands.length, 1); +assert.eq(commands[0].command.create, testName); - // Use a dummy, unrelated operation to signal the txn runner to commit the transaction. - assert.commandWorked(db.runCommand({ping: 1})); - - commands = db.system.profile.find().toArray(); - // Assert the insert is now visible. - assert.eq(commands.length, 3); - assert.eq(commands[0].command.create, testName); - assert.eq(commands[1].command.insert, testName); - assert.eq(commands[2].command.find, 'system.profile'); +// Use a dummy, unrelated operation to signal the txn runner to commit the transaction. +assert.commandWorked(db.runCommand({ping: 1})); +commands = db.system.profile.find().toArray(); +// Assert the insert is now visible. +assert.eq(commands.length, 3); +assert.eq(commands[0].command.create, testName); +assert.eq(commands[1].command.insert, testName); +assert.eq(commands[2].command.find, 'system.profile'); })(); |