RFR 8049696: com/sun/jdi/RunToExit fails with "ConnectException: Connection refused"
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Mon Mar 9 18:40:39 UTC 2015
Please, review the following test change
Issue : https://bugs.openjdk.java.net/browse/JDK-8049696
Webrev: http://cr.openjdk.java.net/~jbachorik/8049696/webrev.00
The test seems to fail due to a premature attempt to connect the
debugee. The test is trying to guard against this by monitoring the
debugee's stdout and allowing to proceed to connect only if something
has already arrived on stdout (presumably the "Listening for transport
dt_socket" message). However, it does not wait for the whole message to
be present in stdout and this might contribute to the instability.
The proposed fix replaces the arbitrary code used to launch the debugee
with the test library ProcessTools.startProcess() and waits for the
whole message being read from stdout before proceeding. If, for any
reason, synchronizing on the presence of this message is still not
enough, the call to method AttachingConnector.attach() is retried if it
has lead to ConnectException (probably not initialized debugee).
Thanks,
-JB-
More information about the serviceability-dev
mailing list