Skip to content

Commit 224426e

Browse files
committed
Codenarc fixes in MongoIterableSubscriptionSpecification
1 parent 0a1d536 commit 224426e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

driver-async/src/test/unit/com/mongodb/async/client/MongoIterableSubscriptionSpecification.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ class MongoIterableSubscriptionSpecification extends Specification {
417417
def cursorResults = [[1, 2]]
418418
def hasSetBatchSize = failImmediately
419419
setBatchSize(_) >> {
420-
if (!hasSetBatchSize) {
421-
hasSetBatchSize = true
420+
if (hasSetBatchSize) {
421+
throw new MongoException('Failure')
422422
} else {
423-
throw new MongoException("Failure")
423+
hasSetBatchSize = true
424424
}
425425
}
426426
next(_) >> {

0 commit comments

Comments
 (0)