summaryrefslogtreecommitdiff
path: root/jstests/sharding/auto2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/auto2.js')
-rw-r--r--jstests/sharding/auto2.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/auto2.js b/jstests/sharding/auto2.js
index 497ee84dbcf..d81f02a3000 100644
--- a/jstests/sharding/auto2.js
+++ b/jstests/sharding/auto2.js
@@ -31,7 +31,7 @@ s.adminCommand( "connpoolsync" );
print( "done inserting data" );
print( "datasize: " + tojson( s.getServer( "test" ).getDB( "admin" ).runCommand( { datasize : "test.foo" } ) ) );
-print( s.config.shard.find().toArray().tojson( "\n" ) );
+s.printShards();
counta = s._connections[0].getDB( "test" ).foo.count();
countb = s._connections[1].getDB( "test" ).foo.count();
@@ -39,6 +39,6 @@ countb = s._connections[1].getDB( "test" ).foo.count();
assert.eq( j * 100 , counta + countb , "from each a:" + counta + " b:" + countb + " i:" + i );
assert.eq( j * 100 , coll.find().limit(100000000).itcount() , "itcount A" );
-assert( s.config.shard.find().toArray().map( function(z){ return z.server; } ).unique().length == 2 , "should be using both servers" );
+assert( Array.unique( s.config.shard.find().toArray().map( function(z){ return z.server; } ) ).length == 2 , "should be using both servers" );
s.stop();