diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2015-12-21 10:44:43 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2015-12-21 10:46:57 -0500 |
commit | 26e9dec5ab8cad307db7795dd0ff74565396199a (patch) | |
tree | 15d86c74b676cf2468cb9d98a33e243a6547b6f0 | |
parent | 39879fb9b856c170fc6884bc365a3be2632ef86b (diff) | |
download | mongo-26e9dec5ab8cad307db7795dd0ff74565396199a.tar.gz |
SERVER-21893 Fix dbHash result check for number of collections.
(cherry picked from commit df25ea8ff2dd2fdc94b5f4cd39b15606aee1dd3b)
-rw-r--r-- | jstests/concurrency/fsm_libs/cluster.js | 4 | ||||
-rw-r--r-- | jstests/sharding/sync_cluster_config/sync2.js | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/jstests/concurrency/fsm_libs/cluster.js b/jstests/concurrency/fsm_libs/cluster.js index 6e6738e0dc0..29d29a5aa4b 100644 --- a/jstests/concurrency/fsm_libs/cluster.js +++ b/jstests/concurrency/fsm_libs/cluster.js @@ -471,8 +471,8 @@ var Cluster = function(options) { hashes.slaves.forEach(function(slaveHashes) { assert.commandWorked(slaveHashes); - assert.eq(masterHashes.collections.length, - slaveHashes.collections.length, + assert.eq(Object.keys(masterHashes.collections).length, + Object.keys(slaveHashes.collections).length, message + ' dbHash number of collections in db ' + dbInfo.name + ' ' + tojson(hashes)); diff --git a/jstests/sharding/sync_cluster_config/sync2.js b/jstests/sharding/sync_cluster_config/sync2.js index d20fff778a1..fa9c77b47fb 100644 --- a/jstests/sharding/sync_cluster_config/sync2.js +++ b/jstests/sharding/sync_cluster_config/sync2.js @@ -85,7 +85,8 @@ for (i = 1; i < hashes.length; i++) { continue; } - assert.eq(hashes[0].collections.length , hashes[i].collections.length , + assert.eq(Object.keys(hashes[0].collections).length , + Object.keys(hashes[i].collections).length , "number of collections do not match:\n" + tojson(hashes[0].collections) + '\n' + tojson(hashes[i].collections)); |