Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ public void HangDumpOnTimeout(RunnerInfo runnerInfo)
var assemblyPaths = GetAssetFullPath("timeout.dll");
var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue);
arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}");
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;HangDumpType=mini;TestTimeout=3s"" /Diag:{TempDirectory.Path}/log.txt");
// Don't reduce this, 10s is about the safe minimum to not have flakiness.
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;HangDumpType=mini;TestTimeout=10s"" /Diag:{TempDirectory.Path}/log.txt");
Comment on lines +136 to +137
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new timeout value (10s) and rationale are embedded inline, and the same comment/value are duplicated across tests. To make future adjustments safer and consistent, consider introducing a shared constant (e.g., const string SafeHangDumpTimeout = \"10s\"; or TimeSpan) and reusing it in both places, with a single comment explaining why that value is required.

Copilot uses AI. Check for mistakes.

var env = new Dictionary<string, string?>
{
Expand Down Expand Up @@ -231,7 +232,8 @@ public void HangDumpChildProcesses(RunnerInfo runnerInfo)
var assemblyPaths = GetAssetFullPath("child-hang.dll");
var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, string.Empty, runnerInfo.InIsolationValue);
arguments = string.Concat(arguments, $" /ResultsDirectory:{TempDirectory.Path}");
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;HangDumpType=mini;TestTimeout=5s""");
// Don't reduce this, 10s is about the safe minimum to not have flakiness.
arguments = string.Concat(arguments, $@" /Blame:""CollectHangDump;HangDumpType=mini;TestTimeout=10s""");
Comment on lines +235 to +236
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication as above: the TestTimeout=10s string and warning comment are repeated. Recommend factoring into a shared constant/helper to avoid drift if one test is updated and the other is not.

Copilot uses AI. Check for mistakes.
InvokeVsTest(arguments);

ValidateDump(2);
Expand Down
Loading