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

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

XMLWordPrintable

    • b134

        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.

              asmotrak Artem Smotrakov
              asmotrak Artem Smotrakov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: