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

Remove usages of Thread.sleep in java/net/Socket/asyncClose/AsyncClose tests

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs

      The test/jdk/java/net/Socket/asyncClose/AsyncClose.java test launches several tests. Each of these tests then launch a couple of threads, one of which waits for the other thread to arrive at the operation being tested. The wait is currently implemented by a Thread.sleep() of 5 seconds.
      In a different area of the JDK tests, we use a stack analysis mechanism to identify whether the target thread has arrived at a (blocking) operation. Using similar technique here can help reduce the wait time and thus the duration of these tests. It will also remove the possibility of the waiting Thread not waiting long enough for the other thread to reach the operation.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: