Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up command monitoring specs #1538

Merged
merged 4 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"description": "command-logging",
"schemaVersion": "1.13",
"description": "command",
"schemaVersion": "1.0",
"createEntities": [
{
"client": {
"id": "client",
"observeLogMessages": {
"command": "debug"
}
"observeEvents": [
"commandStartedEvent",
"commandSucceededEvent",
"commandFailedEvent"
]
}
},
{
"database": {
"id": "database",
"client": "client",
"databaseName": "logging-tests"
"databaseName": "command-monitoring-tests"
}
},
{
"collection": {
"id": "collection",
"database": "database",
"collectionName": "logging-tests-collection"
"collectionName": "test"
}
}
],
"initialData": [
{
"collectionName": "logging-tests-collection",
"databaseName": "logging-tests",
"collectionName": "test",
"databaseName": "command-monitoring-tests",
"documents": [
{
"_id": 1,
Expand All @@ -52,159 +54,25 @@
}
}
],
"expectLogMessages": [
"expectEvents": [
{
"client": "client",
"messages": [
"events": [
{
"level": "debug",
jyemin marked this conversation as resolved.
Show resolved Hide resolved
"component": "command",
"data": {
"message": "Command started",
"databaseName": "logging-tests",
"commandName": "ping",
"commandStartedEvent": {
"command": {
"$$matchAsDocument": {
"$$matchAsRoot": {
"ping": 1,
"$db": "logging-tests"
}
}
},
"requestId": {
"$$type": [
"int",
"long"
]
"ping": 1
},
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
}
}
},
{
"level": "debug",
"component": "command",
"data": {
"message": "Command succeeded",
"databaseName": "logging-tests",
"commandName": "ping",
"reply": {
"$$type": "string"
},
"requestId": {
"$$type": [
"int",
"long"
]
},
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
},
"durationMS": {
"$$type": [
"double",
"int",
"long"
]
}
}
}
]
}
]
},
{
"description": "A failed command",
"operations": [
{
"name": "find",
"object": "collection",
"arguments": {
"filter": {
"$or": true
}
},
"expectError": {
"isClientError": false
}
}
],
"expectLogMessages": [
{
"client": "client",
"messages": [
{
"level": "debug",
"component": "command",
"data": {
"message": "Command started",
"databaseName": "logging-tests",
"commandName": "find",
"command": {
"$$type": "string"
},
"requestId": {
"$$type": [
"int",
"long"
]
},
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
}
"databaseName": "command-monitoring-tests"
}
},
{
"level": "debug",
"component": "command",
"data": {
"message": "Command failed",
"databaseName": "logging-tests",
"commandName": "find",
"failure": {
"$$exists": true
},
"requestId": {
"$$type": [
"int",
"long"
]
},
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
"commandSucceededEvent": {
"reply": {
"ok": 1
},
"durationMS": {
"$$type": [
"double",
"int",
"long"
]
}
"commandName": "ping"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@
},
{
"description": "A successful find event with a getmore and the server kills the cursor (<= 4.4)",
"comment": "UPDATED final batchSize to 3 as batchSize is no longer calculated see: DRIVERS-1448 ",
"runOnRequirements": [
jyemin marked this conversation as resolved.
Show resolved Hide resolved
{
"minServerVersion": "3.1",
Expand Down Expand Up @@ -484,7 +483,7 @@
]
},
"collection": "test",
"batchSize": 3
"batchSize": 1
},
"commandName": "getMore",
"databaseName": "command-monitoring-tests"
Expand Down
Loading