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

spring.config.import in DynamicPropertySource is not contributed using ConfigDataApplicationContextInitializer in tests #832

Open
eddumelendez opened this issue Nov 2, 2023 · 0 comments
Assignees

Comments

@eddumelendez
Copy link
Contributor

Describe the bug
If ConfigDataApplicationContextInitializer is added to tests then properties declared in DynamicPropertySource are not contributed. When I was debugging and put a breakpoint in this class, it was never called.

I did the same for spring-cloud-vault in this example. However, in this case it works.

Locally, I removed those lines and test it similar to the vault example, see changes here, and it worked. Looks like those lines were available since version 3.0.2.

The same happens for spring-cloud-zookeeper and spring-cloud-config. I haven't open issues for those projects yet but if you agree I can do it too.

Sample
https://github.com/eddumelendez/testcontainers-samples/tree/spring-cloud-consul/spring-cloud-consul

@eddumelendez eddumelendez changed the title DynamicPropertySource is not contributed using ConfigDataApplicationContextInitializer in tests spring.config.import in DynamicPropertySource is not contributed using ConfigDataApplicationContextInitializer in tests Nov 6, 2023
@spencergibb spencergibb self-assigned this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants