Skip to content

Commit dd3b55c

Browse files
committed
Fix ChangeStreamBatchCursorSpecification.groovy
1 parent b6ee18f commit dd3b55c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

driver-core/src/test/resources/unified-test-format/valid-pass/poc-command-monitoring.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"tests": [
5959
{
6060
"description": "A successful find event with a getmore and the server kills the cursor (<= 4.4)",
61+
"comment": "UPDATED final batchSize to 3 as batchSize is no longer calculated see: DRIVERS-1448 ",
6162
"runOnRequirements": [
6263
{
6364
"minServerVersion": "3.1",
@@ -150,7 +151,7 @@
150151
]
151152
},
152153
"collection": "test",
153-
"batchSize": 1
154+
"batchSize": 3
154155
},
155156
"commandName": "getMore",
156157
"databaseName": "command-monitoring-tests"

driver-core/src/test/unit/com/mongodb/internal/operation/ChangeStreamBatchCursorSpecification.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import org.bson.BsonDocument
2121
import org.bson.BsonInt32
2222
import spock.lang.Specification
2323

24+
import static java.util.Collections.emptyList
25+
2426
class ChangeStreamBatchCursorSpecification extends Specification {
2527

2628
def 'should call the underlying CommandBatchCursor'() {
@@ -49,7 +51,7 @@ class ChangeStreamBatchCursorSpecification extends Specification {
4951
cursor.next()
5052

5153
then:
52-
1 * wrapped.next()
54+
1 * wrapped.next() >> emptyList()
5355
1 * wrapped.getPostBatchResumeToken()
5456

5557
when:

0 commit comments

Comments
 (0)