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
{{ message }}
Repository navigation
--hangdump-timeout is for the whole test run instead of per-test on macOS #7060
When using the --hangdump-timeout option, the value is considered for the entire test run on macOS. I would expect --hangdump-timeout to be the equivalent of --blame-hang-timeout, which is per-test. It is per-test on Windows.
Steps To Reproduce
Create an xunit v3 test project
dotnet new install xunit.v3.templates
dotnet new xunit3 -o xunit-test
Add a reference to Microsoft.Testing.Extensions.HangDump
The --hangdump-timeout of 3s appears to be for the entire test run, so the run hits the timeout and fails. This happens on macOS, but not Windows.
passed xunit3_test.UnitTest1.Test1 (2s 011ms)
Hang dump timeout of '00:00:03' expired
Dumping process 52649 - xunit3-test
The following tests were still running when dump was taken (format: [<time-elapsed-since-start>] <name>):
[00:00:01] xunit3_test.UnitTest1.Test2
Hello,
this was recently fixed, and we will release the fix in mstest 4.1 / mtp 2.1 #7005
On MacOS the Monitor that is used for indication of activity (tests are starting and finishing) does not reset.
This causes the test run controller to never receive a heartbeat from the test runner, and the run exits after the hang dump timeout, even though test are running.
I would expect --hangdump-timeout to be the equivalent of --blame-hang-timeout, which is per-test. It is per-test on Windows.
This is not how hangdump is designed to work. It has a single timer, and it will dump when there is no activity for the given period of time. In other words with timeout of 20s, you can still run a test that takes 3 minutes, as long as there are other tests running in parallel starting at least every 20s. This will give you a hang dump of tests that would otherwise hang forever, and most likely there won't be any tests that are just "randomly" running at the same time.
Activity
nohwnd commentedon Dec 15, 2025
Hello,
this was recently fixed, and we will release the fix in mstest 4.1 / mtp 2.1 #7005
On MacOS the Monitor that is used for indication of activity (tests are starting and finishing) does not reset.
This causes the test run controller to never receive a heartbeat from the test runner, and the run exits after the hang dump timeout, even though test are running.
This is not how hangdump is designed to work. It has a single timer, and it will dump when there is no activity for the given period of time. In other words with timeout of 20s, you can still run a test that takes 3 minutes, as long as there are other tests running in parallel starting at least every 20s. This will give you a hang dump of tests that would otherwise hang forever, and most likely there won't be any tests that are just "randomly" running at the same time.