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

JDP tests fail but JTreg shows passed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 9
    • core-svc

      Even though the tests in jdk/sun/management/jdp fail, JTreg shows them as passed.

      EXPLANATION:
      This happens because these tests (A) start its own VM in another process (B).
      The failure is detected in this child process (B) but not communicated to the original JTreg process (A).
      The failure can be reproduced in any machine by blocking port 7095.

      SOLUTION:
      The current architecture for this tests is that the VM started started by test is both sending and catching the JDP packets. By changing this so that the started VM sends the packets, but the original process catches them, then the failures will be detected by the JTreg process correctly, without the need for extra communication between these two processes.



      Example output:
      ----------System.err:(19/1244)----------
      '2014-10-14 13:10:27 FINE Test started.
      ''2014-10-14 13:10:27 FINE Listening for multicast packets at 224.0.23.178:7095
      ''2014-10-14 13:10:27 FINE Waiting for 3 packets with jdp.name=50ec70f3-9446-4faa-9e96-6948f2de78f1
      ''2014-10-14 13:10:27 FINE Pause in between packets is: 1 seconds.
      ''2014-10-14 13:10:27 FINE Timeout set to 10 seconds.
      ''2014-10-14 13:10:37 SEVERE Timed out waiting for JDP packet. Should arrive within 1 seconds, but waited for 10 seconds.
      ''2014-10-14 13:10:37 SEVERE Timed out waiting for JDP packet. Should arrive within 1 seconds, but waited for 10 seconds.
      'Exception in thread "main" java.lang.Exception: Timed out waiting for JDP packet. Should arrive within 1 seconds, but waited for 10 seconds.
      at JdpOnTestCase.onSocketTimeOut(JdpOnTestCase.java:73)
      at JdpTestCase.run(JdpTestCase.java:77)
      at JdpOnTestCase.main(JdpOnTestCase.java:103)
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143)
      at java.net.DatagramSocket.receive(DatagramSocket.java:784)
      at JdpTestCase.run(JdpTestCase.java:74)
      ... 1 more

      STATUS:Passed.

            amenkov Alex Menkov
            aschenkm Alex Schenkman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: