quarkus-rest-client-reactive related configuration properties problem
See original GitHub issueDescribe the bug
Seems to be related to this one
Tests ignore the %test
properties for rest clients and try to use the %prod
ones instead.
So having properties like these causes a failure in test that try to expand the prod value
%prod.external-service/mp-rest/url=${EXTERNAL_SERVICE_URL}
%test.external-service/mp-rest/url=http://localhost:8000
Expected behavior
Tests should use the correct profile’s properties of rest clients
Actual behavior
Tests use the prod profile’s properties of rest clients
How to Reproduce?
Reproducer: https://github.com/nikosk686/quarkus-config-properties-error-showcase
Try to run the test on the example linked above. The error is:
Caused by: io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors have prevented the application from starting. The errors are: - SRCFG00011: Could not expand value EXTERNAL_SERVICE_URL in property %prod.external-service/mp-rest/url
Workaround, add a default value %prod.external-service/mp-rest/url=${EXTERNAL_SERVICE_URL:}
and the test passes
Output of uname -a
or ver
Linux dell-desktop 5.10.0-1051-oem #53-Ubuntu SMP Thu Oct 28 08:11:53 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
correto-11 version 11.0.13
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.2.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Gradle 7.3
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
I will have a look.
@BonomoAlessandro I can’t reproduce your problem with 2.5.1.Final neither with current main. Can you open a new issue with a small reproducer if you still experience it?