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
Hey, first of all, thanks for your project, we are using extensively and it's super useful to us.
We have lately faced a strange problem when trying to specify a specific environment file for the tests. It looks like those environment variables will only be picked if you set the fork in tests to true.
During test run It will load and apply another file as defined for Test, the "test.env"
Without forking this will happen in the same process
I'm not 100% sure what exactly happens then but one of the following might be a problem: a) it is not possible to load native library more than once in the same JVM; b) the native library creates a "copy" of the system environment and modifies it and doing this twice, once per environment file, might have unpredictable results
With this reasoning I see possible solutions:
forking (as demonstrated by the test case)
loading the configuration only once (as demonstrated by overriding the env file name in ThisBuild at the beginning of this comment)
I believe another option could be to add some possibility to suppress the loading of the default environment
Maybe it makes sense to debug how the native library related part behaves and modify it if possible to allow multiple applications in single / current process.
Hey, first of all, thanks for your project, we are using extensively and it's super useful to us.
We have lately faced a strange problem when trying to specify a specific environment file for the tests. It looks like those environment variables will only be picked if you set the fork in tests to true.
As it's a bit difficult to explain, I've created a sample project that illustrates the problem we are having https://github.com/albertpastrana/sbtenv-fork-test
Hope that helps
The text was updated successfully, but these errors were encountered: