-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
726 additions
and
0 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
...scovery-and-monitoring/tests/unified/loadbalanced-emit-topology-changed-before-close.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...iscovery-and-monitoring/tests/unified/loadbalanced-emit-topology-changed-before-close.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
description: "loadbalanced-emit-topology-description-changed-before-close" | ||
|
||
schemaVersion: "1.16" | ||
|
||
runOnRequirements: | ||
- topologies: | ||
- load-balanced | ||
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 server connect event. | ||
- name: waitForEvent | ||
object: testRunner | ||
arguments: | ||
client: *client | ||
event: | ||
topologyDescriptionChangedEvent: {} | ||
count: 2 | ||
- name: close | ||
object: *client | ||
expectEvents: | ||
- client: *client | ||
eventType: sdam | ||
events: | ||
- topologyOpeningEvent: {} | ||
- topologyDescriptionChangedEvent: # unknown -> unknown w disconnected server | ||
previousDescription: | ||
type: "Unknown" | ||
currentDescription: {} | ||
- topologyDescriptionChangedEvent: # unknown w disconnected server -> loadBalanced | ||
newDescription: | ||
type: "LoadBalanced" | ||
- topologyDescriptionChangedEvent: # loadbalanced -> unknown | ||
newDescription: | ||
type: "Unknown" | ||
- topologyClosedEvent: {} |
117 changes: 117 additions & 0 deletions
117
...discovery-and-monitoring/tests/unified/replicaset-emit-topology-changed-before-close.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
...-discovery-and-monitoring/tests/unified/replicaset-emit-topology-changed-before-close.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
description: "replicaset-emit-topology-description-changed-before-close" | ||
|
||
schemaVersion: "1.16" | ||
|
||
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: true | ||
events: | ||
- topologyOpeningEvent: {} | ||
- topologyDescriptionChangedEvent: # unknown -> replset no primary | ||
previousDescription: | ||
type: "Unknown" | ||
newDescription: | ||
type: "ReplicaSetNoPrimary" | ||
- topologyDescriptionChangedEvent: # server connected | ||
previousDescription: | ||
type: "ReplicaSetNoPrimary" | ||
newDescription: | ||
type: "ReplicaSetWithPrimary" | ||
- topologyDescriptionChangedEvent: # server connected | ||
previousDescription: | ||
type: "ReplicaSetWithPrimary" | ||
newDescription: | ||
type: "ReplicaSetWithPrimary" | ||
- topologyDescriptionChangedEvent: # server connected | ||
previousDescription: | ||
type: "ReplicaSetWithPrimary" | ||
newDescription: | ||
type: "ReplicaSetWithPrimary" | ||
- topologyDescriptionChangedEvent: # replicaset -> unknown | ||
previousDescription: | ||
type: "ReplicaSetWithPrimary" | ||
newDescription: | ||
type: "Unknown" | ||
- topologyClosedEvent: {} |
Oops, something went wrong.