Open SrikanthTati opened 7 years ago
Can you show the stacktrace of the failure? As I also use TypesafeConfig in my apps and it works quite fine.
Sorry for the delay in response. Got pulled into something else.
There isn't a stack trace. ConfigFactory.load() just fails to load application conf. If I do ConfigFactory.parseFile(new File(path))
its able to load. But if I set system property config.url
and use ConfigFactory.load() then it fails to load from the set URL. The same test case runs fine if I don't run the tests that use S3Mock.
If I exclude tests that use S3Mock, then reader.getConfig("MyConfig")
returns expected configs.
If I include all test(the ones that use S3Mock also), then reader.getConfig("MyConfig")
fails because "MyConfig" is not found. Both attempts set the same value of config.url
I've created a test app to reproduce this easily. https://github.com/SrikanthTati/S3Mock-Test You can run this locally with sbt test to see the failure.
Were you able to reproduce this with the test app I built?
Typesafe config's load() methods fails If I start s3mock. Not sure what is the link between the two. May be classloader issues??
This is how I start s3mock
new S3Mock.Builder().withPort(8001).withInMemoryBackend().build().start
There are other tests that follow which loads config using ConfigFactory.load(). Load() fails only if I start s3mock.