https://kotlinlang.org logo
d

David Hamilton

07/17/2023, 10:43 AM
Also, does the builder cache the built configuration environment variables used somewhere? I've written some tests injecting environment vars, and they pass when run individually, but there are failures when run as a suite. If so, is there an approach (apart from the
ReloadableConfig
) that forces expiry of cached values?
Found where the cache is being applied - it's in the LightBend Config library used by the HoconParser. Adding
ConfigFactory.invalidateCaches()
invalidating the caches in the LightBend Config fixed the problem. I assume therefore this behaviour is specific to
hoplite-hocon