File tree Expand file tree Collapse file tree
src/test/java/org/xbill/DNS Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import org .junit .jupiter .api .AfterAll ;
2727import org .junit .jupiter .api .BeforeAll ;
2828import org .junit .jupiter .api .Test ;
29+ import org .junit .jupiter .api .condition .EnabledIf ;
2930import org .junit .jupiter .api .extension .ExtendWith ;
3031import org .mockito .MockedStatic ;
3132import org .mockito .Mockito ;
3233
3334@ ExtendWith (VertxExtension .class )
3435@ SuppressWarnings ("unchecked" )
36+ @ EnabledIf ("notWindowsOrJre17Plus" )
3537class NioUdpClientTest {
3638 private static SocketAddress localAddress ;
3739
40+ @ SuppressWarnings ("java:S1144" )
41+ private static boolean notWindowsOrJre17Plus () {
42+ String javaVersion = System .getProperty ("java.version" , "0" );
43+ return !System .getProperty ("os.name" ).contains ("Windows" )
44+ || Integer .parseInt (javaVersion .substring (0 , javaVersion .indexOf ('.' ))) >= 17 ;
45+ }
46+
3847 @ BeforeAll
3948 static void beforeAll (Vertx vertx , VertxTestContext context ) {
4049 DatagramSocket datagramSocket = vertx .createDatagramSocket ();
You can’t perform that action at this time.
0 commit comments