From b5b3261c5b9d79622c7e80808a221b190d891419 Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Tue, 28 Nov 2023 11:35:28 +0100 Subject: [PATCH] tests: use temp dir real path --- .../mjeanroy/junit/servers/jetty10/EmbeddedJettyTest.java | 2 +- .../mjeanroy/junit/servers/jetty11/EmbeddedJettyTest.java | 2 +- .../github/mjeanroy/junit/servers/jetty9/EmbeddedJettyTest.java | 2 +- .../github/mjeanroy/junit/servers/jetty/EmbeddedJettyTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/junit-servers-jetty-10/src/test/java/com/github/mjeanroy/junit/servers/jetty10/EmbeddedJettyTest.java b/junit-servers-jetty-10/src/test/java/com/github/mjeanroy/junit/servers/jetty10/EmbeddedJettyTest.java index 5864a92a..fa0bce62 100644 --- a/junit-servers-jetty-10/src/test/java/com/github/mjeanroy/junit/servers/jetty10/EmbeddedJettyTest.java +++ b/junit-servers-jetty-10/src/test/java/com/github/mjeanroy/junit/servers/jetty10/EmbeddedJettyTest.java @@ -109,7 +109,7 @@ void it_should_get_original_jetty() { @Test void it_should_add_parent_classloader(@TempDir Path tmp) throws Exception { - final File tmpFile = Files.createTempFile(tmp, null, null).toFile(); + final File tmpFile = Files.createTempFile(tmp.toRealPath(), null, null).toFile(); final File dir = tmpFile.getParentFile(); final URL url = dir.toURI().toURL(); final String name = tmpFile.getName(); diff --git a/junit-servers-jetty-11/src/test/java/com/github/mjeanroy/junit/servers/jetty11/EmbeddedJettyTest.java b/junit-servers-jetty-11/src/test/java/com/github/mjeanroy/junit/servers/jetty11/EmbeddedJettyTest.java index 4fea5df3..f352d77c 100644 --- a/junit-servers-jetty-11/src/test/java/com/github/mjeanroy/junit/servers/jetty11/EmbeddedJettyTest.java +++ b/junit-servers-jetty-11/src/test/java/com/github/mjeanroy/junit/servers/jetty11/EmbeddedJettyTest.java @@ -109,7 +109,7 @@ void it_should_get_original_jetty() { @Test void it_should_add_parent_classloader(@TempDir Path tmp) throws Exception { - final File tmpFile = Files.createTempFile(tmp, null, null).toFile(); + final File tmpFile = Files.createTempFile(tmp.toRealPath(), null, null).toFile(); final File dir = tmpFile.getParentFile(); final URL url = dir.toURI().toURL(); final String name = tmpFile.getName(); diff --git a/junit-servers-jetty-9/src/test/java/com/github/mjeanroy/junit/servers/jetty9/EmbeddedJettyTest.java b/junit-servers-jetty-9/src/test/java/com/github/mjeanroy/junit/servers/jetty9/EmbeddedJettyTest.java index d52bc53a..896e7087 100644 --- a/junit-servers-jetty-9/src/test/java/com/github/mjeanroy/junit/servers/jetty9/EmbeddedJettyTest.java +++ b/junit-servers-jetty-9/src/test/java/com/github/mjeanroy/junit/servers/jetty9/EmbeddedJettyTest.java @@ -109,7 +109,7 @@ void it_should_get_original_jetty() { @Test void it_should_add_parent_classloader(@TempDir Path tmp) throws Exception { - final File tmpFile = Files.createTempFile(tmp, null, null).toFile(); + final File tmpFile = Files.createTempFile(tmp.toRealPath(), null, null).toFile(); final File dir = tmpFile.getParentFile(); final URL url = dir.toURI().toURL(); final String name = tmpFile.getName(); diff --git a/junit-servers-jetty/src/test/java/com/github/mjeanroy/junit/servers/jetty/EmbeddedJettyTest.java b/junit-servers-jetty/src/test/java/com/github/mjeanroy/junit/servers/jetty/EmbeddedJettyTest.java index 3f3301bf..59ac49f5 100644 --- a/junit-servers-jetty/src/test/java/com/github/mjeanroy/junit/servers/jetty/EmbeddedJettyTest.java +++ b/junit-servers-jetty/src/test/java/com/github/mjeanroy/junit/servers/jetty/EmbeddedJettyTest.java @@ -109,7 +109,7 @@ void it_should_get_original_jetty() { @Test void it_should_add_parent_classloader(@TempDir Path tmp) throws Exception { - final File tmpFile = Files.createTempFile(tmp, null, null).toFile(); + final File tmpFile = Files.createTempFile(tmp.toRealPath(), null, null).toFile(); final File dir = tmpFile.getParentFile(); final URL url = dir.toURI().toURL(); final String name = tmpFile.getName();