| 1 | description: "server-connection-id" |
| 2 | |
| 3 | schemaVersion: "1.13" |
| 4 | |
| 5 | runOnRequirements: |
| 6 | - minServerVersion: "4.2" |
| 7 | |
| 8 | createEntities: |
| 9 | - client: |
| 10 | id: &client client |
| 11 | observeLogMessages: |
| 12 | command: debug |
| 13 | - database: |
| 14 | id: &database database |
| 15 | client: *client |
| 16 | databaseName: &databaseName logging-server-connection-id-tests |
| 17 | - collection: |
| 18 | id: &collection collection |
| 19 | database: *database |
| 20 | collectionName: &collectionName logging-tests-collection |
| 21 | |
| 22 | initialData: |
| 23 | - databaseName: *databaseName |
| 24 | collectionName: *collectionName |
| 25 | documents: [] |
| 26 | |
| 27 | tests: |
| 28 | - description: "command log messages include server connection id" |
| 29 | operations: |
| 30 | - name: insertOne |
| 31 | object: *collection |
| 32 | arguments: |
| 33 | document: { x: 1 } |
| 34 | - name: find |
| 35 | object: *collection |
| 36 | arguments: |
| 37 | filter: { $or: true } |
| 38 | expectError: |
| 39 | isError: true |
| 40 | expectLogMessages: |
| 41 | - client: *client |
| 42 | messages: |
| 43 | - level: debug |
| 44 | component: command |
| 45 | data: |
| 46 | message: "Command started" |
| 47 | commandName: insert |
| 48 | serverConnectionId: { $$type: [int, long] } |
| 49 | - level: debug |
| 50 | component: command |
| 51 | data: |
| 52 | message: "Command succeeded" |
| 53 | commandName: insert |
| 54 | serverConnectionId: { $$type: [int, long] } |
| 55 | - level: debug |
| 56 | component: command |
| 57 | data: |
| 58 | message: "Command started" |
| 59 | commandName: find |
| 60 | serverConnectionId: { $$type: [int, long] } |
| 61 | - level: debug |
| 62 | component: command |
| 63 | data: |
| 64 | message: "Command failed" |
| 65 | commandName: find |
| 66 | serverConnectionId: { $$type: [int, long] } |