Skip to content

Commit 602e98c

Browse files
committed
Fix AsyncFileTest
1 parent 333d3bc commit 602e98c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎core-java/src/test/java/com/baeldung/java/nio2/async/AsyncFileTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public void failed(Throwable exc, ByteBuffer attachment) {
5959

6060
@Test
6161
public void givenPathAndContent_whenWritesToFileWithFuture_thenCorrect() throws IOException, ExecutionException, InterruptedException {
62-
String fileName = UUID.randomUUID().toString();
63-
Path path = Paths.get(Paths.get(HOME));
64-
AsynchronousFileChannel fileChannel = AsynchronousFileChannel.open(path, StandardOpenOption.WRITE, StandardOpenOption.CREATE,StandardOpenOption.DELETE_ON_CLOSE);
62+
String fileName = "temp";
63+
Path path = Paths.get(fileName);
64+
AsynchronousFileChannel fileChannel = AsynchronousFileChannel.open(path, StandardOpenOption.WRITE, StandardOpenOption.CREATE);
6565

6666
ByteBuffer buffer = ByteBuffer.allocate(1024);
6767
long position = 0;

0 commit comments

Comments
 (0)