Wrong error message: If QuarkusTest has wrong working directory, it should not blame it on "NoSuchElementException: SRCFG00011: Could not expand value platform.quarkus.native.builder-image in property quarkus.native.builder-image" #367
In the module quarkus-school-timetabling, open the class TimeTableConstraintProviderTest and run it by clicking on the run icon in the gutter of the java file editor at the class declaration line.
Notice that the working directory of the run configuration that IntelliJ gives you by default will be set to "optaplanner-quickstarts" and not "quarkus-school-timetabling". When it's set incorrectly like that, the unit test fails with this error:
java.lang.RuntimeException: java.lang.RuntimeException: java.util.NoSuchElementException: SRCFG00011: Could not expand value platform.quarkus.native.builder-image in property quarkus.native.builder-image
at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:674)
...
Caused by: java.lang.RuntimeException: java.util.NoSuchElementException: SRCFG00011: Could not expand value platform.quarkus.native.builder-image in property quarkus.native.builder-image
...
Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value platform.quarkus.native.builder-image in property quarkus.native.builder-image
To a user, that error message should instead say "your working directory is wrong", so we can fix it and move on.
Here's how to fix it in the run configuration of intellij (which sets the working dir to quarkus-school-timetabling):
To reproduce with quarkus 1.13.3.Final (I haven't tried 2.0 yet):
Notice that the working directory of the run configuration that IntelliJ gives you by default will be set to "optaplanner-quickstarts" and not "quarkus-school-timetabling". When it's set incorrectly like that, the unit test fails with this error:
To a user, that error message should instead say "your working directory is wrong", so we can fix it and move on.
Here's how to fix it in the run configuration of intellij (which sets the working dir to quarkus-school-timetabling):
https://github.com/quarkusio/quarkus/issues/18132
$upstream:18132$