You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by William Lieurance <wi...@namikoda.com> on 2018/06/11 03:12:28 UTC

Ignored test on EnvironmentPropertySourceTest

Phil pointed out very reasonably that I had ignored a test at https://github.com/apache/incubator-tamaya/blob/ab914033ac5066a0577169a6859911299689ea9a/code/spi-support/src/test/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySourceTest.java#L106 that tried to read an environment variable with a prefix defined in a system property.  I can answer the "why is this disabled" question, which is that I couldn't make it work, and forgot to come back to it before committing the test.  Sorry about that. :-/

Namely, https://github.com/apache/incubator-tamaya/blob/master/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java#L71 says that we should be able to specify a prefix with a property of "tamaya.envprops.prefix=somePrefix" but when I try to put that into the test, it's not picked up.  Phil was able to get the test to work by passing the prefix in the EnvironmentPropertySource constructor, but I wanted to test the system property use case specifically.  Any idea how I could get that use case tested?