Skip to content

Commit 908ea47

Browse files
test: add change stream cluster time unified tests
1 parent 2f26354 commit 908ea47

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

test/spec/change-streams/unified/change-streams-showExpandedEvents.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,15 @@
275275
"name": "createChangeStream",
276276
"object": "collection0",
277277
"arguments": {
278-
"pipeline": [],
278+
"pipeline": [
279+
{
280+
"$match": {
281+
"operationType": {
282+
"$ne": "create"
283+
}
284+
}
285+
}
286+
],
279287
"showExpandedEvents": true
280288
},
281289
"saveResultAsEntity": "changeStream0"

test/spec/change-streams/unified/change-streams-showExpandedEvents.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,15 @@ tests:
160160
- name: createChangeStream
161161
object: *collection0
162162
arguments:
163-
pipeline: []
163+
pipeline:
164+
# On sharded clusters, the create command run when loading initial
165+
# data sometimes is still reported in the change stream. To avoid
166+
# this, we exclude the create command when creating the change
167+
# stream, but specifically don't exclude other events to still catch
168+
# driver errors.
169+
- $match:
170+
operationType:
171+
$ne: create
164172
showExpandedEvents: true
165173
saveResultAsEntity: &changeStream0 changeStream0
166174
- name: createIndex

0 commit comments

Comments
 (0)