Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164166

Make sure java/nio/channels tests shutdown asynchronous channel groups

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b134

      Description

      The following tests may leave daemon threads after they finished:

      java/nio/channels/AsynchronousSocketChannel/Leaky.java
      java/nio/channels/AsynchronousChannelGroup/Identity.java

      The tests above use AsynchronousChannelGroup.withFixedThreadPool() to create instances of AsynchronousChannelGroup. Leaky.java test doesn't shutdown AsynchronousChannelGroup. Identity.java test uses shutdownNow() method, but this method is not called in "finally" block, so that it may be possible that the test leaves daemon threads.

      The tests shouldn't leave daemon threads when they finishes. It may slow down further test execution. If other tests also leave daemon threads, it may cause intermittent test failures, see for example JDK-8160642 and JDK-8162757.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                asmotrak Artem Smotrakov
                Reporter:
                asmotrak Artem Smotrakov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: