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/sharding/replication_with_undefined_shard_key.js | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/sharding/replication_with_undefined_shard_key.js')
-rw-r--r-- | jstests/sharding/replication_with_undefined_shard_key.js | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/jstests/sharding/replication_with_undefined_shard_key.js b/jstests/sharding/replication_with_undefined_shard_key.js index 8e37c171735..2da48889a4c 100644 --- a/jstests/sharding/replication_with_undefined_shard_key.js +++ b/jstests/sharding/replication_with_undefined_shard_key.js @@ -1,30 +1,30 @@ // Test for SERVER-31953 where secondaries crash when replicating an oplog entry where the document // identifier in the oplog entry contains a shard key value that contains an undefined value. (function() { - "use strict"; +"use strict"; - const st = new ShardingTest({mongos: 1, config: 1, shard: 1, rs: {nodes: 2}}); - const mongosDB = st.s.getDB("test"); - const mongosColl = mongosDB.mycoll; +const st = new ShardingTest({mongos: 1, config: 1, shard: 1, rs: {nodes: 2}}); +const mongosDB = st.s.getDB("test"); +const mongosColl = mongosDB.mycoll; - // Shard the test collection on the "x" field. - assert.commandWorked(mongosDB.adminCommand({enableSharding: mongosDB.getName()})); - assert.commandWorked(mongosDB.adminCommand({ - shardCollection: mongosColl.getFullName(), - key: {x: 1}, - })); +// Shard the test collection on the "x" field. +assert.commandWorked(mongosDB.adminCommand({enableSharding: mongosDB.getName()})); +assert.commandWorked(mongosDB.adminCommand({ + shardCollection: mongosColl.getFullName(), + key: {x: 1}, +})); - // Insert a document with a literal undefined value. - assert.writeOK(mongosColl.insert({x: undefined})); +// Insert a document with a literal undefined value. +assert.writeOK(mongosColl.insert({x: undefined})); - jsTestLog("Doing writes that generate oplog entries including undefined document key"); +jsTestLog("Doing writes that generate oplog entries including undefined document key"); - assert.writeOK(mongosColl.update( - {}, - {$set: {a: 1}}, - {multi: true, writeConcern: {w: 2, wtimeout: ReplSetTest.kDefaultTimeoutMs}})); - assert.writeOK( - mongosColl.remove({}, {writeConcern: {w: 2, wtimeout: ReplSetTest.kDefaultTimeoutMs}})); +assert.writeOK(mongosColl.update( + {}, + {$set: {a: 1}}, + {multi: true, writeConcern: {w: 2, wtimeout: ReplSetTest.kDefaultTimeoutMs}})); +assert.writeOK( + mongosColl.remove({}, {writeConcern: {w: 2, wtimeout: ReplSetTest.kDefaultTimeoutMs}})); - st.stop(); +st.stop(); })();
\ No newline at end of file |