summaryrefslogtreecommitdiff
path: root/jstests/sharding/shard1.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-04-13 15:47:20 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-04-21 14:31:46 -0400
commit4777fb87f36dc4c1f808570490eab01a1c12095f (patch)
tree34e6d877daf775d3d1a4d6006b82a2b6eabe61e2 /jstests/sharding/shard1.js
parent1e0624eb98e4c5609ddf86c8f14bdea68bce9f3b (diff)
downloadmongo-4777fb87f36dc4c1f808570490eab01a1c12095f.tar.gz
SERVER-18024 Move collection metadata loading under the catalog manager
Cleans up the CollectionType parsing code and moves all the collection metadata retrieval logic under the catalog manager. Also moves type_collection.* under the catalog manager library.
Diffstat (limited to 'jstests/sharding/shard1.js')
-rw-r--r--jstests/sharding/shard1.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/jstests/sharding/shard1.js b/jstests/sharding/shard1.js
index 10dcafd6ec6..b14ec95f66f 100644
--- a/jstests/sharding/shard1.js
+++ b/jstests/sharding/shard1.js
@@ -23,14 +23,18 @@ s.adminCommand( shardCommand );
assert.throws( function(){ s.adminCommand({ shardCollection: 'test', key: { x: 1 }}); });
assert.throws( function(){ s.adminCommand({ shardCollection: '.foo', key: { x: 1 }}); });
-cconfig = s.config.collections.findOne( { _id : "test.foo" } );
+var cconfig = s.config.collections.findOne( { _id : "test.foo" } );
assert( cconfig , "why no collection entry for test.foo" )
+
delete cconfig.lastmod
delete cconfig.dropped
delete cconfig.lastmodEpoch
-assert.eq( cconfig , { _id : "test.foo" , key : { num : 1 } , unique : false } , "Sharded content" );
-s.config.collections.find().forEach( printjson )
+assert.eq(cconfig,
+ { _id : "test.foo" , key : { num : 1 } , unique : false },
+ "Sharded content mismatch");
+
+s.config.collections.find().forEach( printjson );
assert.eq( 1 , s.config.chunks.count() , "num chunks A");
si = s.config.chunks.findOne();