-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily skip test runner related test failures and pull in client…
… error sessions spec tests
- Loading branch information
Showing
3 changed files
with
192 additions
and
1 deletion.
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
113 changes: 113 additions & 0 deletions
113
test/spec/sessions/unified/snapshot-sessions-not-supported-client-error.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,113 @@ | ||
{ | ||
"description": "snapshot-sessions-not-supported-client-error", | ||
"schemaVersion": "1.0", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "3.6", | ||
"maxServerVersion": "4.4.99" | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"observeEvents": [ | ||
"commandStartedEvent", | ||
"commandFailedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "database0" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "collection0" | ||
} | ||
}, | ||
{ | ||
"session": { | ||
"id": "session0", | ||
"client": "client0", | ||
"sessionOptions": { | ||
"snapshot": true | ||
} | ||
} | ||
} | ||
], | ||
"initialData": [ | ||
{ | ||
"collectionName": "collection0", | ||
"databaseName": "database0", | ||
"documents": [ | ||
{ | ||
"_id": 1, | ||
"x": 11 | ||
} | ||
] | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "Client error on find with snapshot", | ||
"operations": [ | ||
{ | ||
"name": "find", | ||
"object": "collection0", | ||
"arguments": { | ||
"session": "session0", | ||
"filter": {} | ||
}, | ||
"expectError": { | ||
"isClientError": true, | ||
"errorContains": "Snapshot reads require MongoDB 5.0 or later" | ||
} | ||
} | ||
], | ||
"expectEvents": [] | ||
}, | ||
{ | ||
"description": "Client error on aggregate with snapshot", | ||
"operations": [ | ||
{ | ||
"name": "aggregate", | ||
"object": "collection0", | ||
"arguments": { | ||
"session": "session0", | ||
"pipeline": [] | ||
}, | ||
"expectError": { | ||
"isClientError": true, | ||
"errorContains": "Snapshot reads require MongoDB 5.0 or later" | ||
} | ||
} | ||
], | ||
"expectEvents": [] | ||
}, | ||
{ | ||
"description": "Client error on distinct with snapshot", | ||
"operations": [ | ||
{ | ||
"name": "distinct", | ||
"object": "collection0", | ||
"arguments": { | ||
"fieldName": "x", | ||
"filter": {}, | ||
"session": "session0" | ||
}, | ||
"expectError": { | ||
"isClientError": true, | ||
"errorContains": "Snapshot reads require MongoDB 5.0 or later" | ||
} | ||
} | ||
], | ||
"expectEvents": [] | ||
} | ||
] | ||
} |
69 changes: 69 additions & 0 deletions
69
test/spec/sessions/unified/snapshot-sessions-not-supported-client-error.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,69 @@ | ||
description: snapshot-sessions-not-supported-client-error | ||
|
||
schemaVersion: "1.0" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "3.6" | ||
maxServerVersion: "4.4.99" | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
observeEvents: [ commandStartedEvent, commandFailedEvent ] | ||
- database: | ||
id: &database0Name database0 | ||
client: *client0 | ||
databaseName: *database0Name | ||
- collection: | ||
id: &collection0Name collection0 | ||
database: *database0Name | ||
collectionName: *collection0Name | ||
- session: | ||
id: session0 | ||
client: client0 | ||
sessionOptions: | ||
snapshot: true | ||
|
||
initialData: | ||
- collectionName: *collection0Name | ||
databaseName: *database0Name | ||
documents: | ||
- { _id: 1, x: 11 } | ||
|
||
tests: | ||
- description: Client error on find with snapshot | ||
operations: | ||
- name: find | ||
object: collection0 | ||
arguments: | ||
session: session0 | ||
filter: {} | ||
expectError: | ||
isClientError: true | ||
errorContains: Snapshot reads require MongoDB 5.0 or later | ||
expectEvents: [] | ||
|
||
- description: Client error on aggregate with snapshot | ||
operations: | ||
- name: aggregate | ||
object: collection0 | ||
arguments: | ||
session: session0 | ||
pipeline: [] | ||
expectError: | ||
isClientError: true | ||
errorContains: Snapshot reads require MongoDB 5.0 or later | ||
expectEvents: [] | ||
|
||
- description: Client error on distinct with snapshot | ||
operations: | ||
- name: distinct | ||
object: collection0 | ||
arguments: | ||
fieldName: x | ||
filter: {} | ||
session: session0 | ||
expectError: | ||
isClientError: true | ||
errorContains: Snapshot reads require MongoDB 5.0 or later | ||
expectEvents: [] |