Skip to content

CSHARP-4305: Update ChangeStreamEvent type definition to include clusterTime #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"description": "change-streams-clusterTime",
"schemaVersion": "1.4",
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": false
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "database0"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "collection0"
}
}
],
"runOnRequirements": [
{
"minServerVersion": "4.0.0",
"topologies": [
"replicaset",
"sharded-replicaset",
"load-balanced",
"sharded"
],
"serverless": "forbid"
}
],
"initialData": [
{
"collectionName": "collection0",
"databaseName": "database0",
"documents": []
}
],
"tests": [
{
"description": "clusterTime is present",
"operations": [
{
"name": "createChangeStream",
"object": "collection0",
"arguments": {
"pipeline": []
},
"saveResultAsEntity": "changeStream0"
},
{
"name": "insertOne",
"object": "collection0",
"arguments": {
"document": {
"_id": 1
}
}
},
{
"name": "iterateUntilDocumentOrError",
"object": "changeStream0",
"expectResult": {
"ns": {
"db": "database0",
"coll": "collection0"
},
"clusterTime": {
"$$exists": true
}
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
description: "change-streams-clusterTime"
schemaVersion: "1.4"
createEntities:
- client:
id: &client0 client0
useMultipleMongoses: false
- database:
id: &database0 database0
client: *client0
databaseName: *database0
- collection:
id: &collection0 collection0
database: *database0
collectionName: *collection0

runOnRequirements:
- minServerVersion: "4.0.0"
topologies: [ replicaset, sharded-replicaset, load-balanced, sharded ]
serverless: forbid

initialData:
- collectionName: *collection0
databaseName: *database0
documents: []

tests:
- description: "clusterTime is present"
operations:
- name: createChangeStream
object: *collection0
arguments: { pipeline: [] }
saveResultAsEntity: &changeStream0 changeStream0
- name: insertOne
object: *collection0
arguments:
document: { _id: 1 }
- name: iterateUntilDocumentOrError
object: *changeStream0
expectResult:
ns: { db: *database0, coll: *collection0 }
clusterTime: { $$exists: true }