You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding extension io.quarkus:quarkus-smallrye-health running multiple tests in parallel sometimes causes NoSuchFileException.
Caused by: java.nio.file.NoSuchFileException: /var/folders/1z/vlh4t0fj7qx8dldd244qst9w0000gp/T/quarkus/com.example/health-ui-no-such-file/io.smallrye/smallrye-health-ui/3.1.2/healthui.js
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.newByteChannel(Files.java:422)
at java.base/java.nio.file.Files.readAllBytes(Files.java:3206)
at io.quarkus.smallrye.health.deployment.SmallRyeHealthProcessor.updateApiUrl(SmallRyeHealthProcessor.java:500)
at io.quarkus.smallrye.health.deployment.SmallRyeHealthProcessor.registerUiExtension(SmallRyeHealthProcessor.java:436)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821)
Best I can tell digging through the source, ui resources are being extracted from the smallrye-health-ui jar and put into a temporary directory, but that location is not unique per test and is being cleaned prior to extraction, so tests running in parallel can cause already extracted files to be deleted and subsequent errors on read.
I'm running multiple tests in parallel in gradle with:
test {
maxParallelForks = 4
}
This is still an issue even with the health ui is disabled via quarkus.smallrye-health.ui.enable = false
Expected behavior
Tests run in parallel do not fail due to the extension io.quarkus:quarkus-smallrye-health being applied.
Describe the bug
After adding extension
io.quarkus:quarkus-smallrye-health
running multiple tests in parallel sometimes causesNoSuchFileException
.Best I can tell digging through the source, ui resources are being extracted from the
smallrye-health-ui
jar and put into a temporary directory, but that location is not unique per test and is being cleaned prior to extraction, so tests running in parallel can cause already extracted files to be deleted and subsequent errors on read.I'm running multiple tests in parallel in gradle with:
This is still an issue even with the health ui is disabled via
quarkus.smallrye-health.ui.enable = false
Expected behavior
Tests run in parallel do not fail due to the extension
io.quarkus:quarkus-smallrye-health
being applied.Actual behavior
Build fails with above exception.
How to Reproduce?
health-ui-no-such-file.zip
The above project reproduces the issue pretty consistently for me just running
./gradlew build
Output of
uname -a
orver
Darwin WMac5205964 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.11" 2021-04-20
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 7.2
Additional information
No response
The text was updated successfully, but these errors were encountered: