diff --git a/reactor-netty-core/src/test/java/reactor/netty/ByteBufFluxTest.java b/reactor-netty-core/src/test/java/reactor/netty/ByteBufFluxTest.java index 89d4478485..5a8cb47b32 100644 --- a/reactor-netty-core/src/test/java/reactor/netty/ByteBufFluxTest.java +++ b/reactor-netty-core/src/test/java/reactor/netty/ByteBufFluxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 VMware, Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2017-2022 VMware, Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -139,9 +139,7 @@ void testFromPath() throws Exception { private static File createTemporaryDirectory() { try { - final File tempDir = File.createTempFile("ByteBufFluxTest", "", null); - assertThat(tempDir.delete()).isTrue(); - assertThat(tempDir.mkdir()).isTrue(); + final File tempDir = Files.createTempDirectory("ByteBufFluxTest").toFile(); return tempDir; } catch (Exception e) {