未验证 提交 7ba7f036 编写于 作者: A Adeel Mujahid 提交者: GitHub

Clear gcServer envvar before running the scenario (#66907)

上级 548b70db
......@@ -26,7 +26,7 @@ static int Verify_ServerGC_Env_Enable(string[] _)
}
[Fact]
[ConfigProperty("DOTNET_gcServer", "0")]
[EnvVar("DOTNET_gcServer", "0")]
static int Verify_ServerGC_Env_Disable(string[] _)
{
return GCSettings.IsServerGC
......@@ -95,6 +95,10 @@ class ConfigPropertyAttribute : Attribute
static int RunTests()
{
// clear some environment variables that we will set during the test run
Environment.SetEnvironmentVariable("DOTNET_gcServer", null);
Environment.SetEnvironmentVariable("COMPlus_gcServer", null);
string corerunPath = GetCorerunPath();
MethodInfo[] infos = typeof(TestConfig).GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public);
foreach (var mi in infos)
......@@ -156,4 +160,4 @@ static string GetCorerunPath()
}
return Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), corerunName);
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册