From 602e98c6c3352148044924b5d702db3d59bd8349 Mon Sep 17 00:00:00 2001 From: pivovarit Date: Mon, 28 Nov 2016 22:18:22 +0100 Subject: [PATCH] Fix AsyncFileTest --- .../java/com/baeldung/java/nio2/async/AsyncFileTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core-java/src/test/java/com/baeldung/java/nio2/async/AsyncFileTest.java b/core-java/src/test/java/com/baeldung/java/nio2/async/AsyncFileTest.java index fcffc524b1..b03acf83ca 100644 --- a/core-java/src/test/java/com/baeldung/java/nio2/async/AsyncFileTest.java +++ b/core-java/src/test/java/com/baeldung/java/nio2/async/AsyncFileTest.java @@ -59,9 +59,9 @@ public class AsyncFileTest { @Test public void givenPathAndContent_whenWritesToFileWithFuture_thenCorrect() throws IOException, ExecutionException, InterruptedException { - String fileName = UUID.randomUUID().toString(); - Path path = Paths.get(Paths.get(HOME)); - AsynchronousFileChannel fileChannel = AsynchronousFileChannel.open(path, StandardOpenOption.WRITE, StandardOpenOption.CREATE,StandardOpenOption.DELETE_ON_CLOSE); + String fileName = "temp"; + Path path = Paths.get(fileName); + AsynchronousFileChannel fileChannel = AsynchronousFileChannel.open(path, StandardOpenOption.WRITE, StandardOpenOption.CREATE); ByteBuffer buffer = ByteBuffer.allocate(1024); long position = 0;