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

tests property system.setProperty #627

Open
jonenst opened this issue Oct 21, 2024 · 0 comments
Open

tests property system.setProperty #627

jonenst opened this issue Oct 21, 2024 · 0 comments

Comments

@jonenst
Copy link
Contributor

jonenst commented Oct 21, 2024

should use @DynamicPropertySource
static void register(DynamicPropertyRegistry registry) {
registry.add("spring.elasticsearch.xxx", () -> yyy);

instead of System.setProperty

see https://github.com/powsybl/powsybl-case-server/pull/11/files#diff-36e0324746b1b66aaa0dfccba891937eb10b1ca4ff7661d3469afd5ef981f152R46

It's a better API to test things rather than hoping that we are the last do to system.setProperty before it is read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant