camel-quarkus icon indicating copy to clipboard operation
camel-quarkus copied to clipboard

CoreTest.classpathPackageScan fails in the Quarkus Platform

Open jamesnetherton opened this issue 8 months ago • 2 comments

Bug description

java.lang.AssertionError: 
2 expectations failed.
Response body doesn't match expectation.
Expected: a string containing "sub-resources-folder/foo/bar/test-1.txt"
  Actual: classpath:META-INF/vertx/vertx-version.txt

Response body doesn't match expectation.
Expected: a string containing "sub-resources-folder/foo/bar/test-2.txt"

jamesnetherton avatar Apr 28 '25 11:04 jamesnetherton

Seems wildcard scans like **/*.txt produce different results depending on the launch mode or package type.

These work:

  • Test mode
  • JAR package type uber-jar
  • Native image

These does not produce the expected results:

  • Running tests from test-jar in the Quarkus Platform
  • JAR package type fast-jar

I don't want to have core tests disabled in the Quarkus Platform indefinitely, so I may do a workaround in the problem test case until there's a proper fix.

jamesnetherton avatar Apr 30 '25 13:04 jamesnetherton

Looks like my workaround didn't work so I'll need to take another try at fixing it.

jamesnetherton avatar Jun 23 '25 12:06 jamesnetherton

Tests pass with Camel Quarkus 3.25.0.

jamesnetherton avatar Jul 28 '25 09:07 jamesnetherton

Just adding note about https://github.com/apache/camel-quarkus/blob/3.25.0/integration-test-groups/foundation/core/src/test/java/org/apache/camel/quarkus/core/CoreTest.java#L171 from @jamesnetherton :

There is some weirdness in Camel with classpath resource scanning depending on how apps are packaged / run. So TODO was more around if the issues are ever fixed in Camel, then we can run the tests in the platform.

llowinge avatar Aug 11 '25 09:08 llowinge