-
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.
DRIVERS-1670: Add log messages to SDAM spec (#1419)
Co-authored-by: Kaitlin Mahar <kaitlinmahar@gmail.com>
- Loading branch information
Showing
19 changed files
with
3,834 additions
and
84 deletions.
There are no files selected for viewing
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
439 changes: 359 additions & 80 deletions
439
.../server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst
Large diffs are not rendered by default.
Oops, something went wrong.
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
150 changes: 150 additions & 0 deletions
150
source/server-discovery-and-monitoring/tests/unified/logging-loadbalanced.json
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,150 @@ | ||
{ | ||
"description": "loadbalanced-logging", | ||
"schemaVersion": "1.16", | ||
"runOnRequirements": [ | ||
{ | ||
"topologies": [ | ||
"load-balanced" | ||
], | ||
"minServerVersion": "4.4" | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "Topology lifecycle", | ||
"operations": [ | ||
{ | ||
"name": "createEntities", | ||
"object": "testRunner", | ||
"arguments": { | ||
"entities": [ | ||
{ | ||
"client": { | ||
"id": "client", | ||
"observeLogMessages": { | ||
"topology": "debug" | ||
}, | ||
"observeEvents": [ | ||
"topologyDescriptionChangedEvent" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "waitForEvent", | ||
"object": "testRunner", | ||
"arguments": { | ||
"client": "client", | ||
"event": { | ||
"topologyDescriptionChangedEvent": {} | ||
}, | ||
"count": 2 | ||
} | ||
}, | ||
{ | ||
"name": "close", | ||
"object": "client" | ||
} | ||
], | ||
"expectLogMessages": [ | ||
{ | ||
"client": "client", | ||
"messages": [ | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Starting topology monitoring", | ||
"topologyId": { | ||
"$$exists": true | ||
} | ||
} | ||
}, | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Topology description changed", | ||
"topologyId": { | ||
"$$exists": true | ||
}, | ||
"previousDescription": { | ||
"$$exists": true | ||
}, | ||
"newDescription": { | ||
"$$exists": true | ||
} | ||
} | ||
}, | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Starting server monitoring", | ||
"topologyId": { | ||
"$$exists": true | ||
}, | ||
"serverHost": { | ||
"$$type": "string" | ||
}, | ||
"serverPort": { | ||
"$$type": [ | ||
"int", | ||
"long" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Topology description changed", | ||
"topologyId": { | ||
"$$exists": true | ||
}, | ||
"previousDescription": { | ||
"$$exists": true | ||
}, | ||
"newDescription": { | ||
"$$exists": true | ||
} | ||
} | ||
}, | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Stopped server monitoring", | ||
"topologyId": { | ||
"$$exists": true | ||
}, | ||
"serverHost": { | ||
"$$type": "string" | ||
}, | ||
"serverPort": { | ||
"$$type": [ | ||
"int", | ||
"long" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"level": "debug", | ||
"component": "topology", | ||
"data": { | ||
"message": "Stopped topology monitoring", | ||
"topologyId": { | ||
"$$exists": true | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
74 changes: 74 additions & 0 deletions
74
source/server-discovery-and-monitoring/tests/unified/logging-loadbalanced.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,74 @@ | ||
description: "loadbalanced-logging" | ||
|
||
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 | ||
observeLogMessages: | ||
topology: debug | ||
observeEvents: | ||
- topologyDescriptionChangedEvent | ||
# 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 | ||
expectLogMessages: | ||
- client: *client | ||
messages: | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Starting topology monitoring" | ||
topologyId: { $$exists: true } | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Topology description changed" | ||
topologyId: { $$exists: true } | ||
previousDescription: { $$exists: true } # unknown topology | ||
newDescription: { $$exists: true } # unknown topology, disconnected server | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Starting server monitoring" | ||
topologyId: { $$exists: true } | ||
serverHost: { $$type: string } | ||
serverPort: { $$type: [int, long] } | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Topology description changed" | ||
topologyId: { $$exists: true } | ||
previousDescription: { $$exists: true } | ||
newDescription: { $$exists: true } # loadBalanced topology | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Stopped server monitoring" | ||
topologyId: { $$exists: true } | ||
serverHost: { $$type: string } | ||
serverPort: { $$type: [int, long] } | ||
- level: debug | ||
component: topology | ||
data: | ||
message: "Stopped topology monitoring" | ||
topologyId: { $$exists: true } |
Oops, something went wrong.