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
So that it can be used to override system properties and ENV variables.
Implementation ideas
We could either make the ordinal of the QuarkusComponentTest config source configurable (i.e. all test config properties will have the same priority) or extend the API like @TestConfigProperty(key = "foo", value = "bar", ordinal = 100) (ordinal corresponds to the org.eclipse.microprofile.config.spi.ConfigSource.getOrdinal()). The latter is more flexible but also more verbose.
The text was updated successfully, but these errors were encountered:
Keep in mind that io.quarkus.test.junit.QuarkusTestProfile.getConfigOverrides() is implemented as "restorable system properties" which means that if a profile overrides a config property it's currently not possible to override this property with @TestConfigProperty.
The more I think about this the more I believe that we should change the default ordinal to something like 500 so that the test config properties take precedence over system properties and ENV variables...
mkouba
added a commit
to mkouba/quarkus
that referenced
this issue
Aug 4, 2023
- change the default value to 500 so that test config properties take
predence over system properties, ENV variables and
application.properties
- make the ordinal configurable
- fixesquarkusio#35199
- change the default value to 500 so that test config properties take
predence over system properties, ENV variables and
application.properties
- make the ordinal configurable
- fixesquarkusio#35199
Description
So that it can be used to override system properties and ENV variables.
Implementation ideas
We could either make the ordinal of the QuarkusComponentTest config source configurable (i.e. all test config properties will have the same priority) or extend the API like
@TestConfigProperty(key = "foo", value = "bar", ordinal = 100)
(ordinal
corresponds to theorg.eclipse.microprofile.config.spi.ConfigSource.getOrdinal()
). The latter is more flexible but also more verbose.The text was updated successfully, but these errors were encountered: