Test failures due to connection leaks and unexpected exceptions in bulk write tests

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      During the execution of CrudProseTest.testBulkWriteHandlesWriteErrorsAcrossBatches, the test fails with an unexpected IllegalStateException (timeout during blocking read) instead of the expected ClientBulkWriteException. Additionally, an assertion error occurs because not all connections are closed after shutting down the client, and a NullPointerException is thrown in asynchronous channel handling. 

      Evidence from logs: Link

      • Assertion error: Expected all connections to be closed after closing the client.
      • Unexpected exception: java.lang.IllegalStateException instead of ClientBulkWriteException
      • NullPointerException in async channel: Cannot invoke "java.nio.ByteBuffer.hasRemaining()" because "this.buf" is null

      Impact:

      • Potential resource leaks due to lingering connections
      • Test instability and unpredictable failures

      Acceptance criteria:

      • Investigate and fix resource cleanup to ensure all connections are closed after MongoClient shutdown

            Assignee:
            Almas Abdrazak
            Reporter:
            Slav Babanin
            Ross Lawley, Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: