diff options
author | Robert Guo <robert.guo@10gen.com> | 2016-03-19 21:26:21 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2016-04-12 11:04:46 -0400 |
commit | 3caa06819ab544bf9e88f4413c363a6439fe1998 (patch) | |
tree | 20e22c13c5c5794cc68052f4d650e248d0c441cb /jstests/core/apitest_dbcollection.js | |
parent | 80859ca45c2392fd6c7a48f94bd6805d3fd013b0 (diff) | |
download | mongo-3caa06819ab544bf9e88f4413c363a6439fe1998.tar.gz |
SERVER-22588 make validate command work in a sharded collection
Diffstat (limited to 'jstests/core/apitest_dbcollection.js')
-rw-r--r-- | jstests/core/apitest_dbcollection.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/core/apitest_dbcollection.js b/jstests/core/apitest_dbcollection.js index d542ad6d7e1..8f0129319f7 100644 --- a/jstests/core/apitest_dbcollection.js +++ b/jstests/core/apitest_dbcollection.js @@ -42,7 +42,9 @@ for (i = 0; i < 100; i++) { (function() { var validateResult = assert.commandWorked(db.getCollection("test_db").validate()); // Extract validation results from mongos output if running in a sharded context. - if (jsTest.isMongos(db.getMongo())) { + var isShardedNS = validateResult.hasOwnProperty('raw'); + + if (isShardedNS) { // Sample mongos format: // { // raw: { |