summaryrefslogtreecommitdiff
path: root/jstests/sharding/diffservers1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/diffservers1.js')
-rw-r--r--jstests/sharding/diffservers1.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/jstests/sharding/diffservers1.js b/jstests/sharding/diffservers1.js
index 0dbfa0b9502..26347ec8330 100644
--- a/jstests/sharding/diffservers1.js
+++ b/jstests/sharding/diffservers1.js
@@ -1,25 +1,25 @@
(function() {
- 'use strict';
+'use strict';
- var s = new ShardingTest({shards: 2});
+var s = new ShardingTest({shards: 2});
- assert.eq(2, s.config.shards.count(), "server count wrong");
+assert.eq(2, s.config.shards.count(), "server count wrong");
- var test1 = s.getDB("test1").foo;
- assert.writeOK(test1.insert({a: 1}));
- assert.writeOK(test1.insert({a: 2}));
- assert.writeOK(test1.insert({a: 3}));
- assert.eq(3, test1.count());
+var test1 = s.getDB("test1").foo;
+assert.writeOK(test1.insert({a: 1}));
+assert.writeOK(test1.insert({a: 2}));
+assert.writeOK(test1.insert({a: 3}));
+assert.eq(3, test1.count());
- assert.commandFailed(s.s0.adminCommand({addshard: "sdd$%", maxTimeMS: 60000}), "Bad hostname");
+assert.commandFailed(s.s0.adminCommand({addshard: "sdd$%", maxTimeMS: 60000}), "Bad hostname");
- var portWithoutHostRunning = allocatePort();
- assert.commandFailed(
- s.s0.adminCommand({addshard: "127.0.0.1:" + portWithoutHostRunning, maxTimeMS: 60000}),
- "Host which is not up");
- assert.commandFailed(
- s.s0.adminCommand({addshard: "10.0.0.1:" + portWithoutHostRunning, maxTimeMS: 60000}),
- "Allowed shard in IP when config is localhost");
+var portWithoutHostRunning = allocatePort();
+assert.commandFailed(
+ s.s0.adminCommand({addshard: "127.0.0.1:" + portWithoutHostRunning, maxTimeMS: 60000}),
+ "Host which is not up");
+assert.commandFailed(
+ s.s0.adminCommand({addshard: "10.0.0.1:" + portWithoutHostRunning, maxTimeMS: 60000}),
+ "Allowed shard in IP when config is localhost");
- s.stop();
+s.stop();
})();