forked from mongodb/mongo-rust-driver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreplicaset-emit-topology-changed-before-close.yml
49 lines (46 loc) · 1.61 KB
/
replicaset-emit-topology-changed-before-close.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
description: "replicaset-emit-topology-description-changed-before-close"
schemaVersion: "1.20"
runOnRequirements:
- topologies:
- replicaset
minServerVersion: "4.4" # awaitable hello
tests:
- description: "Topology lifecycle"
operations:
- name: createEntities
object: testRunner
arguments:
entities:
- client:
id: &client client
observeEvents:
- topologyDescriptionChangedEvent
- topologyOpeningEvent
- topologyClosedEvent
# ensure the topology has been fully discovered before closing the client.
# expected events are initial server discovery and 3 server connect events.
- name: waitForEvent
object: testRunner
arguments:
client: *client
event:
topologyDescriptionChangedEvent: {}
count: 4
- name: close
object: *client
expectEvents:
- client: *client
eventType: sdam
ignoreExtraEvents: false
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: {}