File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
test/jdk/java/net/DatagramSocket Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2019, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3737 * @test
3838 * @summary Check interrupt mechanism for DatagramSocket,
3939 * MulticastSocket, and DatagramSocketAdaptor
40+ * @library /test/lib
4041 * @run main InterruptibleDatagramSocket
4142 */
4243
@@ -97,6 +98,10 @@ else if (!s.isClosed() && interruptible)
9798 }
9899
99100 public static void main (String [] args ) throws Exception {
101+ if (Thread .currentThread ().isVirtual ()) {
102+ throw new jtreg .SkippedException (
103+ "skipping test execution - main thread is a virtual thread" );
104+ }
100105 try (DatagramSocket s = new DatagramSocket ()) {
101106 System .out .println ("Testing interrupt of DatagramSocket receive " +
102107 "on endpoint " + s .getLocalSocketAddress ());
You can’t perform that action at this time.
0 commit comments