File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
driver-core/src/test/functional/com/mongodb/operation Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -478,9 +478,13 @@ class ChangeStreamOperationSpecification extends OperationFunctionalSpecificatio
478
478
when :
479
479
helper. killCursor(helper. getNamespace(), cursor. getWrapped(). getServerCursor())
480
480
expected = insertDocuments(helper, [3 , 4 ])
481
+ def results = nextAndClean(cursor, async)
482
+ if (results. size() < expected. size()) {
483
+ results. addAll(nextAndClean(cursor, async))
484
+ }
481
485
482
486
then :
483
- nextAndClean(cursor, async) == expected
487
+ results == expected
484
488
485
489
then :
486
490
tryNextAndClean(cursor, async) == null
@@ -489,8 +493,13 @@ class ChangeStreamOperationSpecification extends OperationFunctionalSpecificatio
489
493
expected = insertDocuments(helper, [5 , 6 ])
490
494
helper. killCursor(helper. getNamespace(), cursor. getWrapped(). getServerCursor())
491
495
496
+ results = nextAndClean(cursor, async)
497
+ if (results. size() < expected. size()) {
498
+ results. addAll(nextAndClean(cursor, async))
499
+ }
500
+
492
501
then :
493
- nextAndClean(cursor, async) == expected
502
+ results == expected
494
503
495
504
cleanup :
496
505
cursor?. close()
You can’t perform that action at this time.
0 commit comments