mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-29 04:28:30 +00:00
8368098: (aio) java/nio/channels/Channels/AsyncCloseStreams.java fails in junit timeout
Reviewed-by: alanb
This commit is contained in:
parent
1668162319
commit
8b1cf8eefe
@ -136,12 +136,14 @@ public class AsyncCloseStreams {
|
||||
try {
|
||||
Path path = Files.createTempFile(Path.of("."), "foo", "bar");
|
||||
path.toFile().deleteOnExit();
|
||||
byte[] bytes = new byte[100_000];
|
||||
Arrays.fill(bytes, (byte)27);
|
||||
|
||||
do {
|
||||
OutputStream out = Files.newOutputStream(path);
|
||||
close.offer(out);
|
||||
try {
|
||||
out.write(27);
|
||||
out.write(bytes);
|
||||
} catch (AsynchronousCloseException ace) {
|
||||
System.err.println("AsynchronousCloseException caught");
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user