RFR: JDK-8181383: com/sun/jdi/OptionTest.java fails intermittently with bind failed: Address already in use

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Sat Feb 23 03:53:14 UTC 2019


Hi Alex,

It looks good to me.

Just minor comments.

http://cr.openjdk.java.net/~amenkov/OptionTest_socket/webrev/test/jdk/com/sun/jdi/RunToExit.java.udiff.html

+ // port the debuggee is listening on
+ private static String address;

Local style is to use /**/ comments on class level that start from 
capital letters.

+ // warm-up predicate for debuggee
+ private static Pattern listenRegexp = Pattern.compile("Listening for 
transport \\b(.+)\\b at address: \\b(.+)\\b");
      private static boolean isTransportListening(String line) {

The same comment as above.
Empty line is missed after new field definition.


Copyright comments need an update.
No need in new webrev.

Thanks,
Serguei


On 2/22/19 4:31 PM, Alex Menkov wrote:
> Hi all,
>
> Please review a fix for
> https://bugs.openjdk.java.net/browse/JDK-8181383
> webrev:
> http://cr.openjdk.java.net/~amenkov/OptionTest_socket/webrev/
>
> The change fixes OptionTest and RunToExit tests to avoid "address 
> already in use" failures by using dynamic port allocation (address=0).
> OptionTest runs debuggee with "suspend=n" and waits it to exit (it 
> does not connect to the debugee VM).
> RunToExit connects to the debuggee VM, so logic to detect listening 
> port is added.
>
> --alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190222/3fc4e170/attachment.html>


More information about the serviceability-dev mailing list