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
I have ConfigData implementation for a custom KV storage: Loader, LocationResolver, Resource. They are specified in spring.factories under appropriate sections. I also verified that the whole setup works fine when using in an application.
I want to test it though. I use @SpringBootTest for the test and Testcontainers for KV storage setup. @DynamicPropertySource is there quite specifically to address the dynamic nature of ports and other options exposed by Testcontainers so this is what I do:
When I run the test, I do see that Loader is being created but when ConfigDataEnvironment processes and applies itself, @DynamicPropertySource has not been taken into account yet. Inlined Test Properties are already there but they are not dynamic. As result, anything that might have been added to properties for ConfigData is getting in way too late.