From 1c039934ba610942d6a4eb430d0f9dba7fa5c75e Mon Sep 17 00:00:00 2001 From: Sergey Zelenov Date: Thu, 5 Mar 2026 15:59:23 +0100 Subject: [PATCH] test(NODE-7432): sync spec tests for SDAM --- .../errors/error_handling_handshake.json | 4 +- .../errors/error_handling_handshake.yml | 82 ++++++++++--------- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.json b/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.json index bf83f46f6a..b63228d96a 100644 --- a/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.json +++ b/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.json @@ -85,7 +85,7 @@ } }, { - "description": "Mark server unknown on network timeout application error (beforeHandshakeCompletes)", + "description": "Ignore network timeout application error (beforeHandshakeCompletes)", "applicationErrors": [ { "address": "a:27017", @@ -118,4 +118,4 @@ } } ] -} +} \ No newline at end of file diff --git a/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.yml b/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.yml index 46d7bbf94e..051dfff558 100644 --- a/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.yml +++ b/test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.yml @@ -1,46 +1,48 @@ description: Network timeouts before and after the handshake completes uri: mongodb://a/?replicaSet=rs phases: -- description: Primary A is discovered - responses: - - - a:27017 - - ok: 1 - helloOk: true - isWritablePrimary: true - hosts: - - a:27017 + - description: Primary A is discovered + responses: + - - a:27017 + - ok: 1 + helloOk: true + isWritablePrimary: true + hosts: + - a:27017 + setName: rs + minWireVersion: 0 + maxWireVersion: 9 + topologyVersion: &topologyVersion_1_1 + processId: + "$oid": '000000000000000000000001' + counter: + "$numberLong": '1' + outcome: &outcome + servers: + a:27017: + type: RSPrimary + setName: rs + topologyVersion: *topologyVersion_1_1 + pool: + generation: 0 + topologyType: ReplicaSetWithPrimary + logicalSessionTimeoutMinutes: null setName: rs - minWireVersion: 0 - maxWireVersion: 9 - topologyVersion: &topologyVersion_1_1 - processId: - "$oid": '000000000000000000000001' - counter: - "$numberLong": '1' - outcome: &outcome - servers: - a:27017: - type: RSPrimary - setName: rs - topologyVersion: *topologyVersion_1_1 - pool: - generation: 0 - topologyType: ReplicaSetWithPrimary - logicalSessionTimeoutMinutes: null - setName: rs -- description: Ignore network timeout application error (afterHandshakeCompletes) - applicationErrors: - - address: a:27017 - when: afterHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome + - description: Ignore network timeout application error (afterHandshakeCompletes) + applicationErrors: + - address: a:27017 + when: afterHandshakeCompletes + maxWireVersion: 9 + type: timeout + outcome: *outcome -- description: Mark server unknown on network timeout application error (beforeHandshakeCompletes) - applicationErrors: - - address: a:27017 - when: beforeHandshakeCompletes - maxWireVersion: 9 - type: timeout - outcome: *outcome \ No newline at end of file + - description: Ignore network timeout application error (beforeHandshakeCompletes) + # The test runner may need to add the SystemOverloadedError label for the pre-handshake network timeout. + # The SystemOverloadedError label causes the error to be ignored. + applicationErrors: + - address: a:27017 + when: beforeHandshakeCompletes + maxWireVersion: 9 + type: timeout + outcome: *outcome \ No newline at end of file