Skip to content

Commit 5877802

Browse files
authored
RUST-964 Update unified tests for session errors with correct syntax (#447)
1 parent b6e4560 commit 5877802

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

src/test/spec/json/sessions/unified/snapshot-sessions-not-supported-client-error.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070
}
7171
}
7272
],
73-
"expectEvents": []
73+
"expectEvents": [
74+
{
75+
"client": "client0",
76+
"events": []
77+
}
78+
]
7479
},
7580
{
7681
"description": "Client error on aggregate with snapshot",
@@ -88,7 +93,12 @@
8893
}
8994
}
9095
],
91-
"expectEvents": []
96+
"expectEvents": [
97+
{
98+
"client": "client0",
99+
"events": []
100+
}
101+
]
92102
},
93103
{
94104
"description": "Client error on distinct with snapshot",
@@ -107,7 +117,12 @@
107117
}
108118
}
109119
],
110-
"expectEvents": []
120+
"expectEvents": [
121+
{
122+
"client": "client0",
123+
"events": []
124+
}
125+
]
111126
}
112127
]
113128
}

src/test/spec/json/sessions/unified/snapshot-sessions-not-supported-client-error.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ tests:
4141
expectError:
4242
isClientError: true
4343
errorContains: Snapshot reads require MongoDB 5.0 or later
44-
expectEvents: []
44+
expectEvents:
45+
- client: *client0
46+
events: []
4547

4648
- description: Client error on aggregate with snapshot
4749
operations:
@@ -53,7 +55,9 @@ tests:
5355
expectError:
5456
isClientError: true
5557
errorContains: Snapshot reads require MongoDB 5.0 or later
56-
expectEvents: []
58+
expectEvents:
59+
- client: *client0
60+
events: []
5761

5862
- description: Client error on distinct with snapshot
5963
operations:
@@ -66,4 +70,6 @@ tests:
6670
expectError:
6771
isClientError: true
6872
errorContains: Snapshot reads require MongoDB 5.0 or later
69-
expectEvents: []
73+
expectEvents:
74+
- client: *client0
75+
events: []

0 commit comments

Comments
 (0)