While working on
JAVA-4183, I discovered that some integration tests for AsyncQueryBatchCursor fail when run with load balancer, and one spec test seems to fail sporadically and quite rarely. There is a good chance that these failures all have the same cause. These failures prevented me from running AsyncQueryBatchCursorFunctionalSpecification together with QueryBatchCursorFunctionalSpecification with load balancer (the latter runs with load balancer since JAVA-4183).
- steady failures with LB (note that these tests succeed in non-LB mode
- AsyncQueryBatchCursorFunctionalSpecification.'should unblock if closed while waiting for more data from tailable cursor'
- AsyncQueryBatchCursorFunctionalSpecification.'should not retain connection and source after cursor is exhausted on first batch'
- AsyncQueryBatchCursorFunctionalSpecification.'should not retain connection and source after cursor is exhausted on getMore'
- sporadic com.mongodb.reactivestreams.client.unified.LoadBalancerTest failure: cursors.json: "pinned connections are returned when the cursor is drained" (the logs)
Both of the above patches are done by using https://github.com/mongodb/mongo-java-driver/pull/765 as the base (note that this PR does touches neither AsyncQueryBatchCursor nor AsyncQueryBatchCursorFunctionalSpecification), removing @Slow annotations from tests (because of
JAVA-4145) in AsyncQueryBatchCursorFunctionalSpecification and adding these tests to run-load-balancer-tests.sh. I was not able to do this with master because the aforementioned PR has changes needed to support running AsyncQueryBatchCursorFunctionalSpecification with load balancer. By the time this ticket is in progress, the aforementioned PR will probably have been merged, and the experiment may be repeated with master.
Implementation of this ticket should also add AsyncQueryBatchCursorFunctionalSpecification to run-load-balancer-tests.sh.