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

java/net/Socket/Timeouts.java fails with java.lang.AssertionError: expected [true] but found [false] for testTimedAccept9 scenario

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 22
    • core-libs
    • x86_64
    • linux

       SBR linux OL9 JDK22 b18
      java.lang.AssertionError: expected [true] but found [false]
      at org.testng.Assert.fail(Assert.java:99)
      at org.testng.Assert.failNotEquals(Assert.java:1037)
      at org.testng.Assert.assertTrue(Assert.java:45)
      at org.testng.Assert.assertTrue(Assert.java:55)
      at Timeouts.testTimedAccept9(Timeouts.java:437)

      create a serversocket
      set timeout for 4 seconds
      schedules a thread interrupt in 1 second
      invokes accept

      SocketTimeoutException thrown but serversocket accept is not interrupted.

      There are a couple of thousand threads executing over 64 cpus, conjecture that 4 seconds is intermittently not sufficient for the interrupter to actually run, even though it is expected within 1 second, it may only be RTR. Perhaps extend the socket timeout a bit.
      Alternatively the interrupt was missed.

      some elementary diagnostic in the scheduled task to highlight that the scheduled activity is about to take place would be useful.

            dclarke Darragh Clarke
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: