Skip to content

Commit

Permalink
Speed up ThreadLocalStatics_Test in DEBUG builds (dotnet#72151)
Browse files Browse the repository at this point in the history
Saw this test timeout in dotnet#72077. This should decrease the amount of work done by the test by 25%. It is the longest test in DynamicGenerics. It was only recently enabled.

```
Running Test: ThreadLocalStatics.TLSTesting.ThreadLocalStatics_Test

cmdLine:D:\a\_work\1\s\artifacts\tests\coreclr\windows.x64.Debug\nativeaot\SmokeTests\DynamicGenerics\DynamicGenerics\DynamicGenerics.cmd Timed Out (timeout in milliseconds: 1800000 from variable __TestTimeout, start: 7/13/2022 7:46:11 AM, end: 7/13/2022 8:16:11 AM)
Test Harness Exitcode is : -100
```
  • Loading branch information
MichalStrehovsky authored Jul 14, 2022
1 parent 35f0230 commit aecdcca
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,12 @@ public static void ThreadLocalStatics_Test()
GC.Collect();
}

MultiThreaded_Test(TypeOf.TLS_T4, TypeOf.TLS_T5, 20, 20);
#if DEBUG
const int numTasks = 15;
#else
const int numTasks = 20;
#endif
MultiThreaded_Test(TypeOf.TLS_T4, TypeOf.TLS_T5, numTasks, 20);
}
}
}

0 comments on commit aecdcca

Please sign in to comment.