mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-28 20:03:39 +00:00
8347171: (dc) java/nio/channels/DatagramChannel/InterruptibleOrNot.java fails with virtual thread factory
Reviewed-by: alanb, lmesnik
This commit is contained in:
parent
72f1114909
commit
1ef77cdd51
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,6 +47,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.function.Executable;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assumptions.*;
|
||||
|
||||
public class InterruptibleOrNot {
|
||||
// DatagramChannel implementation class
|
||||
@ -98,6 +99,7 @@ public class InterruptibleOrNot {
|
||||
*/
|
||||
@Test
|
||||
public void testInterruptBeforeUninterruptibleReceive() throws Exception {
|
||||
assumeFalse(Thread.currentThread().isVirtual());
|
||||
try (DatagramChannel dc = boundDatagramChannel(false)) {
|
||||
ByteBuffer buf = ByteBuffer.allocate(100);
|
||||
onReceive(() -> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user