RFR: 7539: JDP Tests failing in VPN environments [v3]
Christoph Langer
clanger at openjdk.java.net
Sat Jan 22 13:40:15 UTC 2022
On Fri, 21 Jan 2022 17:25:18 GMT, Johannes Bechberger <duke at openjdk.java.net> wrote:
>> Only run broadcasting related tests when supported.
>> Tested on Mac M1 with and without VPN.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Formatting
Looks good, I only have a few minor suggestions. For me it's ok to leave out the windows build script for now. I can add this later on, I want to play with that script anyway, have just built with maven so far.
build.sh line 297:
> 295: ;;
> 296: --skipJDPMulticastTests)
> 297: JVM_ARGUMENTS="${JVM_ARGUMENTS} -DskipJDPMulticastTests=true "
nit: you could remove the space after -DskipJDPMulticastTests=true
core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java line 55:
> 53: private static final String TEST_MULTICAST_ADDRESS_STRING = "224.0.23.177";
> 54: public static final InetAddress TEST_MULTICAST_ADDRESS;
> 55:
nit: Leave that line.
core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java line 158:
> 156: */
> 157: public static boolean areBroadcastingTestsEnabled() {
> 158: if (System.getProperty("skipJDPMulticastTests", "false").equals("true")) {
you could do: `if (Boolean.getBoolean("skipJDPMulticastTests")) {` here
core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java line 171:
> 169: helpMessage += String.format("'sudo ip route add %s dev eth0'", address);
> 170: } else {
> 171: helpMessage = "";
On windows you can recommend to `route add ... <gateway>` in a shell with administrator permissions. I did that and this made the test work. Obviously the user has to look up the gateway.
Something like
`helpMessage += String.format("'route add %s <gateway>' in a shell with administrator permissions", address);`
core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java line 174:
> 172: }
> 173: JDPClientTest.LOGGER.log(Level.WARNING, "Broadcasting does not seem to be possible.\n"
> 174: + "This is usually related to VPN. There are four possible ways to remedy this:\n"
Actually, you enumerate only 3 possibilities, although the last one consists of two distinct options, depending on your build scenario
-------------
Changes requested by clanger (Author).
PR: https://git.openjdk.java.net/jmc/pull/369
More information about the jmc-dev
mailing list