RFR: 7539: JDP Tests failing in VPN environments
Johannes Bechberger
duke at openjdk.java.net
Fri Jan 21 14:53:11 UTC 2022
On Fri, 21 Jan 2022 14:33:15 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>> Only run broadcasting related tests when supported.
>> Tested on Mac M1 with and without VPN.
>
> core/tests/org.openjdk.jmc.jdp.test/src/test/java/org/openjdk/jmc/jdp/client/TestToolkit.java line 165:
>
>> 163: int multiCastPort = 7711;
>> 164: Thread thread = new Thread(() -> {
>> 165: try {
>
> you can use a try-with resources here: `try (MulticastSocket ssocket = new MulticastSocket(multiCastPort)) {` That way, the socket will also be closed in the end.
you're right, I forgot it.
-------------
PR: https://git.openjdk.java.net/jmc/pull/369
More information about the jmc-dev
mailing list