Skip to content

Commit d71588e

Browse files
authored
PHPLIB-945: Update ChangeStreamEvent type definition to include clusterTime (#971)
1 parent 0c7fede commit d71588e

File tree

2 files changed

+84
-1
lines changed

2 files changed

+84
-1
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"description": "change-streams-clusterTime",
3+
"schemaVersion": "1.4",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0",
8+
"useMultipleMongoses": false
9+
}
10+
},
11+
{
12+
"database": {
13+
"id": "database0",
14+
"client": "client0",
15+
"databaseName": "database0"
16+
}
17+
},
18+
{
19+
"collection": {
20+
"id": "collection0",
21+
"database": "database0",
22+
"collectionName": "collection0"
23+
}
24+
}
25+
],
26+
"runOnRequirements": [
27+
{
28+
"minServerVersion": "4.0.0",
29+
"topologies": [
30+
"replicaset",
31+
"sharded-replicaset",
32+
"load-balanced",
33+
"sharded"
34+
],
35+
"serverless": "forbid"
36+
}
37+
],
38+
"initialData": [
39+
{
40+
"collectionName": "collection0",
41+
"databaseName": "database0",
42+
"documents": []
43+
}
44+
],
45+
"tests": [
46+
{
47+
"description": "clusterTime is present",
48+
"operations": [
49+
{
50+
"name": "createChangeStream",
51+
"object": "collection0",
52+
"arguments": {
53+
"pipeline": []
54+
},
55+
"saveResultAsEntity": "changeStream0"
56+
},
57+
{
58+
"name": "insertOne",
59+
"object": "collection0",
60+
"arguments": {
61+
"document": {
62+
"_id": 1
63+
}
64+
}
65+
},
66+
{
67+
"name": "iterateUntilDocumentOrError",
68+
"object": "changeStream0",
69+
"expectResult": {
70+
"ns": {
71+
"db": "database0",
72+
"coll": "collection0"
73+
},
74+
"clusterTime": {
75+
"$$exists": true
76+
}
77+
}
78+
}
79+
]
80+
}
81+
]
82+
}

tests/UnifiedSpecTests/change-streams/change-streams-showExpandedEvents.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"replicaset",
99
"sharded-replicaset",
1010
"sharded"
11-
]
11+
],
12+
"serverless": "forbid"
1213
}
1314
],
1415
"createEntities": [

0 commit comments

Comments
 (0)