Skip to content

Commit 0684bf9

Browse files
committed
Expect clusterTime field in tests of change stream document response.
1 parent b8c8b0c commit 0684bf9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

driver-core/src/test/functional/com/mongodb/operation/AggregateOperationSpecification.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class AggregateOperationSpecification extends OperationFunctionalSpecification {
210210
then:
211211
def next = next(cursor, async).collect { doc ->
212212
doc.remove('_id')
213+
doc.remove('clusterTime')
213214
doc
214215
}
215216
next == expected

driver-core/src/test/functional/com/mongodb/operation/ChangeStreamOperationSpecification.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,16 +439,17 @@ class ChangeStreamOperationSpecification extends OperationFunctionalSpecificatio
439439
}
440440

441441
def tryNextAndClean(cursor, boolean async) {
442-
removeId(tryNext(cursor, async))
442+
removeExtra(tryNext(cursor, async))
443443
}
444444

445445
def nextAndClean(cursor, boolean async) {
446-
removeId(next(cursor, async))
446+
removeExtra(next(cursor, async))
447447
}
448448

449-
def removeId(List<BsonDocument> next) {
449+
def removeExtra(List<BsonDocument> next) {
450450
next?.collect { doc ->
451451
doc.remove('_id')
452+
doc.remove('clusterTime')
452453
doc
453454
}
454455
}

0 commit comments

Comments
 (0)