Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ConfigurationSources for system properties and environment varia… #146

Merged

Conversation

majkiw
Copy link
Contributor

@majkiw majkiw commented Apr 8, 2016

…bles

public void shouldReturnManuallyDefinedKeysAfterReload() throws Exception {
assertThat(source.getConfiguration(new DefaultEnvironment())).doesNotContainKey("reloaded.property");
System.setProperty("reloaded.property", "defined");
assertThat(source.getConfiguration(new DefaultEnvironment())).containsKey("reloaded.property");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually not clear if the contract of getConfiguration() requires it to be stable unless reload() is called.
InMemoryConfigurationSource seems to only change when reload() is called, however FilesConfigurationSource would reload on every getConfiguration() call.

@majkiw
Copy link
Contributor Author

majkiw commented Apr 8, 2016

This intents to solve #128

@norbertpotocki norbertpotocki added this to the v.4.3.0 milestone Apr 8, 2016
@norbertpotocki
Copy link
Member

👍 👏

@norbertpotocki norbertpotocki merged commit 526f47f into cfg4j:master Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants