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 am trying to set the environment variables using the version 1.18.0 and I am always getting null. I am using Junit 5 and have no issues using 1.17.2 version to set the system environment variables. I need to set different environment values for different tests, so not setting the value right after creating the rule. My code looks like the following:
@Rule
private final EnvironmentVariables environmentVariables = new EnvironmentVariables();
@Test
void testEnvValues() {
environmentVariables.set("service_env", "dev");
assertEquals("dev", System.getenv("service_env")); // always fails
}
davidmc24, ocassio, tirumalesh-yeligar-by-zz and uklimaschewski