blob: 0729b8d257893ce60c4c74fa0fba05373c4487d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System
{
public static class TestEnvironment
{
/// <summary>
/// Check if the stress mode is enabled.
/// </summary>
/// <value> true if the environment variable DOTNET_TEST_STRESS set to '1' or 'true'. returns false otherwise</value>
public static bool IsStressModeEnabled
{
get
{
string value = Environment.GetEnvironmentVariable("DOTNET_TEST_STRESS");
return value != null && (value == "1" || value.Equals("true", StringComparison.OrdinalIgnoreCase));
}
}
}
}
|