diff options
author | Luis Osta <luis.osta@mongodb.com> | 2021-08-31 17:21:13 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-31 17:46:54 +0000 |
commit | 20f10822d217c3e64ddff45012042a30edd3fa93 (patch) | |
tree | e591ad8803414ecaf1b3140d2a4420522bed9f00 /jstests | |
parent | 56c91fc80fe8224c5469c776e85b885cd0367dbb (diff) | |
download | mongo-20f10822d217c3e64ddff45012042a30edd3fa93.tar.gz |
SERVER-59694 added null check for find queries in config.cache.collectionsn collection
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/sharding/resharding_prohibited_commands.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/resharding_prohibited_commands.js b/jstests/sharding/resharding_prohibited_commands.js index 0e3c2222c6a..6ab2f753edd 100644 --- a/jstests/sharding/resharding_prohibited_commands.js +++ b/jstests/sharding/resharding_prohibited_commands.js @@ -80,7 +80,7 @@ reshardingTest.withReshardingInBackground( donor0.getCollection("config.cache.collections").findOne({_id: ns}); const res1 = donor1.getCollection("config.cache.collections").findOne({_id: ns}); - return res0.reshardingFields.state === "aborting" && + return res0 && res0.reshardingFields.state === "aborting" && res1 && res1.reshardingFields.state === "aborting"; }, () => `timed out waiting for the coordinator to persist decision`); @@ -175,7 +175,7 @@ reshardingTest.withReshardingInBackground( () => { const res = recipient.getCollection("config.cache.collections").findOne({_id: ns}); - return res.reshardingFields.state === "committing"; + return res && res.reshardingFields.state === "committing"; }, () => `timed out waiting for the coordinator to persist decision: ${ tojson(res)}`); |