-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quarkus Classloader in Test not returning all results #40371
Labels
Milestone
Comments
/cc @Sanne (core), @aloubyansky (core), @geoand (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core) |
stuartwdouglas
added a commit
to stuartwdouglas/quarkus
that referenced
this issue
Apr 30, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371
🙏 for fixing this so fast and back porting! ❤️ |
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
May 10, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371 (cherry picked from commit 9daa467)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
May 22, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371 (cherry picked from commit 9daa467)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
May 22, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371 (cherry picked from commit 9daa467)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
May 23, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371 (cherry picked from commit 9daa467)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jun 4, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371 (cherry picked from commit 9daa467)
holly-cummins
pushed a commit
to holly-cummins/quarkus
that referenced
this issue
Jul 31, 2024
Previously if the resources were in the same PathTree only one would be returned. Fixes quarkusio#40371
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Hi there, I'm Ronald and the creator of https://github.com/jobrunr/jobrunr.
I'm currently writing an extra test using @QuarkusTest and I'm loading resources from the classpath. My setup is Intellij / a multimodule Gradle project / Quarkus.
I'm using the following code:
Currently, I only have the following result:
file:/Users/rdehuyss/Projects/JobRunr/jobrunr/core/build/classes/java/main/org/jobrunr/storage/sql/common/migrations
However, I also expected the following result:
file:/Users/rdehuyss/Projects/JobRunr/jobrunr/core/build/resources/main/org/jobrunr/storage/sql/common/migrations
From what I understand, the JavaDoc of getResources mentions:
If I do
then the url is available and the resource is found.
Any idea why the classloader.getResources(folder) is not returning the actual resources but only the java classes? Is this a bug in the Quarkus ClassLoader?
Expected behavior
Return all the resources on the classpath.
Actual behavior
Only returns first resource on the classath
How to Reproduce?
See https://github.com/rdehuyss/quarkus-classloader-reproducer.
The
ClassLoaderTest
in the modulequarkus
should succeed whereas it currently fails.Output of
uname -a
orver
Darwin Ronalds-MacBook-Pro.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:10 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6031 arm64
Output of
java -version
openjdk version "21.0.2" 2024-01-16 LTS OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)
Quarkus version or git rev
3.8.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.5
Additional information
No response
The text was updated successfully, but these errors were encountered: