diff options
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)}`); |