Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
The test "should support return the expected results" in ChangeStreamOperationSpecification is racy. Because closing an asynchronous cursor is itself asynchronous, in some cases the cleanup checks in ServerHelper#checkPool can run before the close completes, resulting in the following failure:
java.lang.IllegalStateException: Connection pool in use count is 1
|
at com.mongodb.connection.ServerHelper.checkPool(ServerHelper.java:60)
|
at com.mongodb.connection.ServerHelper.checkPool(ServerHelper.java:34)
|
at com.mongodb.OperationFunctionalSpecification.cleanup(OperationFunctionalSpecification.groovy:69)
|
So far, I haven't seen this in the debugger or on evergreen, but I can reproduce it with a local replica set with this command line:
./gradlew -Dorg.mongodb.test.uri=mongodb://jeff:27017,jeff:27018/?replicaset=replset driver-core:test
|