From 04f9240d9dcac6ea874005e80489c43b7cdc73fa Mon Sep 17 00:00:00 2001 From: Warren James Date: Fri, 29 Mar 2024 15:30:09 -0400 Subject: [PATCH] update tests --- ...lient-topologyDescriptionChangedEvent.json | 36 +++++-------------- ...Client-topologyDescriptionChangedEvent.yml | 21 ++++------- 2 files changed, 15 insertions(+), 42 deletions(-) diff --git a/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.json b/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.json index f4ca695251..b2a9915bc3 100644 --- a/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.json +++ b/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.json @@ -37,47 +37,27 @@ "event": { "topologyDescriptionChangedEvent": {} }, - "count": 4 + "count": 1 } - }, - { - "name": "close", - "object": "client" } ], "expectEvents": [ { "client": "client", "eventType": "sdam", - "ignoreExtraEvents": false, + "ignoreExtraEvents": true, "events": [ { "topologyOpeningEvent": {} }, { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": {} - }, - { - "topologyDescriptionChangedEvent": { - "previousDescription": { - "type": "ReplicaSetWithPrimary" - }, - "newDescription": { - "type": "Unknown" - } + "topologyDescriptionChangedEvent": null, + "previousDescription": { + "type": "Unknown" + }, + "newDescription": { + "type": "ReplicaSetWithPrimary" } - }, - { - "topologyClosedEvent": {} } ] } diff --git a/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.yml b/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.yml index f3bd3acbcf..b7ced3022e 100644 --- a/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.yml +++ b/source/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.yml @@ -26,23 +26,16 @@ tests: client: *client event: topologyDescriptionChangedEvent: {} - count: 4 - - name: close - object: *client + count: 1 expectEvents: - client: *client eventType: sdam - ignoreExtraEvents: false + ignoreExtraEvents: true events: - topologyOpeningEvent: {} - - topologyDescriptionChangedEvent: {} # unknown -> replset no primary - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: {} # server connected - - topologyDescriptionChangedEvent: # replicaset -> unknown - previousDescription: - type: "ReplicaSetWithPrimary" - newDescription: - type: "Unknown" - - topologyClosedEvent: {} + - topologyDescriptionChangedEvent: + previousDescription: + type: "Unknown" + newDescription: + type: "ReplicaSetWithPrimary"