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
Looking at the implementation of ConfigProviderResolverImpl.initialiseApplicationConfig(...) and it's change history I believe it was broken with commit 99370d7.
Expected Outcome
The microprofile configuration spec for default ConfigSources indicates that allMETA-INF/microprofile-config.properties files on the classpath should be loaded.
A ConfigSource for each property file META-INF/microprofile-config.properties found on the classpath. (default ordinal = 100).
Current Outcome
The configuration provider loads only the first properties file returned by the classloader. This results in default configuration values in any other files not being loaded into the config.
Steps to reproduce
I experienced this bug during test execution in my project. I've been using Arquillian to test features and injecting a config file into the test deployment with defaults for the test case.
When I recently started exploring usage of the MP REST client, I added another config file to the project in the source classpath for default locations of the services. Adding this config hides the configuration included in the test deployment and causes the tests to fail because the values used by the test are no longer present in the configuration.
While Arquillian should only be using the config file inside the deployment during testing, I suspect that using the embedded Payara container has the source/test classpath available and the MP config is picking up both.
Environment
Payara Version: 5.192
Edition: Micro
JDK Version: OpenJDK 8
Operating System: Linux
The text was updated successfully, but these errors were encountered:
Description
Looking at the implementation of
ConfigProviderResolverImpl.initialiseApplicationConfig(...)
and it's change history I believe it was broken with commit 99370d7.Expected Outcome
The microprofile configuration spec for default
ConfigSources
indicates that allMETA-INF/microprofile-config.properties
files on the classpath should be loaded.Current Outcome
The configuration provider loads only the first properties file returned by the classloader. This results in default configuration values in any other files not being loaded into the config.
Steps to reproduce
I experienced this bug during test execution in my project. I've been using Arquillian to test features and injecting a config file into the test deployment with defaults for the test case.
When I recently started exploring usage of the MP REST client, I added another config file to the project in the source classpath for default locations of the services. Adding this config hides the configuration included in the test deployment and causes the tests to fail because the values used by the test are no longer present in the configuration.
While Arquillian should only be using the config file inside the deployment during testing, I suspect that using the embedded Payara container has the source/test classpath available and the MP config is picking up both.
Environment
The text was updated successfully, but these errors were encountered: