summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoustafa Maher Khalil <m.maher@mongodb.com>2022-06-01 18:49:18 +0000
committerMoustafa Maher Khalil <m.maher@mongodb.com>2022-06-29 21:29:16 +0000
commit82bdc07662e22b265719c77ee748874e80498cb1 (patch)
treeeebb9e29765883ecffdfe6d785b95d7d2a40878b
parentfe65f07e07d169babdffa36d7ac3aff51f46d7de (diff)
downloadmongo-82bdc07662e22b265719c77ee748874e80498cb1.tar.gz
SERVER-65234 collection_uuid_index_commands test should account for HostUnreachable error from different shards
-rw-r--r--jstests/core/collection_uuid_index_commands.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/core/collection_uuid_index_commands.js b/jstests/core/collection_uuid_index_commands.js
index 558c8f55c2d..a323859144c 100644
--- a/jstests/core/collection_uuid_index_commands.js
+++ b/jstests/core/collection_uuid_index_commands.js
@@ -20,6 +20,12 @@ const validateErrorResponse = function(
// In sharded cluster scenario, the inner raw shards reply should contain the error info,
// along with the outer reply obj.
for (let [_, shardReply] of Object.entries(res.raw)) {
+ if (shardReply.code === ErrorCodes.HostUnreachable) {
+ // We can hit this error on some suites that kills the primary node on shards.
+ // Skipping is safe as this is rare and most probably happens on one shard.
+ continue;
+ }
+
assert.eq(shardReply.code, ErrorCodes.CollectionUUIDMismatch);
assert.eq(shardReply.db, db);
assert.eq(shardReply.collectionUUID, collectionUUID);