Skip to content

Commit fd1da85

Browse files
author
duke
committed
Backport 1ef77cdd51b91f6d6d3367444a37a3f0f2e4bc99
1 parent 9e811f1 commit fd1da85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/jdk/java/nio/channels/DatagramChannel/InterruptibleOrNot.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2024, 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
@@ -47,6 +47,7 @@
4747
import org.junit.jupiter.api.BeforeAll;
4848
import org.junit.jupiter.api.function.Executable;
4949
import static org.junit.jupiter.api.Assertions.*;
50+
import static org.junit.jupiter.api.Assumptions.*;
5051

5152
public class InterruptibleOrNot {
5253
// DatagramChannel implementation class
@@ -98,6 +99,7 @@ public void testInterruptDuringInterruptibleReceive() throws Exception {
9899
*/
99100
@Test
100101
public void testInterruptBeforeUninterruptibleReceive() throws Exception {
102+
assumeFalse(Thread.currentThread().isVirtual());
101103
try (DatagramChannel dc = boundDatagramChannel(false)) {
102104
ByteBuffer buf = ByteBuffer.allocate(100);
103105
onReceive(() -> {

0 commit comments

Comments
 (0)