JUnitShell.getModuleUrl() produces invalid URL for IPv6 addresses

23 views
Skip to first unread message

Maik Riechert

unread,
Jun 18, 2013, 5:59:49 AM6/18/13
to google-we...@googlegroups.com
Hi,

it seems the JUnitShell is generating invalid URLs if IPv6 is used:

http://2607:f700:8000:12d:dd58:687b:744c:800c:48579/...

You can observe this here:
https://travis-ci.org/neothemachine/KineticGWT/builds/8191369#L881

The URL should be

http://[2607:f700:8000:12d:dd58:687b:744c:800c]:48579/...

Is this a known issue? I couldn't find anything related to that.

Cheers
Maik

Thomas Broyer

unread,
Jun 18, 2013, 6:38:45 AM6/18/13
to google-we...@googlegroups.com
I don't think I've seen a bug report about that. This is due to constructing the URL by string concatenations; using java.net.URL or java.net.URI, the brackets could be added automatically if needed (depending on the constructor used).
As a workaround, because you're working on a custom RunStyle, override RunStyle#getLocalHostName to add the brackets when the InetAddress is an Inet6Address.
Feel free to file a bug in the issue tracker. And it'd be awesome if you could provide a patch! (note that there's a similar issue in RunStyleSelenium I guess)

Maik Riechert

unread,
Jun 19, 2013, 12:36:26 PM6/19/13
to google-we...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages