Skip to content

Add acceptance test for hang dump triggering after test session finish#7429

Merged
Youssef1313 merged 2 commits intodev/ygerges/hangdumpfrom
copilot/sub-pr-7392
Feb 20, 2026
Merged

Add acceptance test for hang dump triggering after test session finish#7429
Youssef1313 merged 2 commits intodev/ygerges/hangdumpfrom
copilot/sub-pr-7392

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 18, 2026

Adds test coverage for the hang dump fix (#7314) that ensures hang dumps trigger even when foreground threads continue running after test execution completes.

Test Implementation

  • New test HangDump_WithBackgroundThreadAfterSessionFinish_CreateDump spawns a foreground thread that hangs after tests finish
  • Test asset modified to spawn thread when SPAWN_BACKGROUND_THREAD environment variable is set
  • Verifies dump file creation after 8-second timeout despite session completion

The test validates that removing session end coordination (previous fix) allows hang dump monitoring to continue post-session:

// In test asset's ExecuteRequestAsync
if (Environment.GetEnvironmentVariable("SPAWN_BACKGROUND_THREAD") == "true")
{
    Thread backgroundThread = new Thread(() => Thread.Sleep(600000));
    backgroundThread.IsBackground = false; // Foreground thread prevents process exit
    backgroundThread.Start();
}
context.Complete(); // Session ends but process hangs

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 18, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • c50vsblobprodcus330.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx//.dotnet/dotnet /home/REDACTED/work/testfx/testfx//.dotnet/dotnet build /home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/jQIcM/AssetFixture -c Release -p:MSBuildTreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:/home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/AssetFixture-1.binlog (dns block)
  • o3svsblobprodcus318.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx//.dotnet/dotnet /home/REDACTED/work/testfx/testfx//.dotnet/dotnet build /home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/jQIcM/AssetFixture -c Release -p:MSBuildTreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:/home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/AssetFixture-1.binlog (dns block)
  • pe4vsblobprodcus351.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx//.dotnet/dotnet /home/REDACTED/work/testfx/testfx//.dotnet/dotnet build /home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/jQIcM/AssetFixture -c Release -p:MSBuildTreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:/home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/AssetFixture-1.binlog (dns block)
  • pkvvsblobprodcus321.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx//.dotnet/dotnet /home/REDACTED/work/testfx/testfx//.dotnet/dotnet build /home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/jQIcM/AssetFixture -c Release -p:MSBuildTreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:/home/REDACTED/work/testfx/testfx/artifacts/tmp/Debug/testsuite/AssetFixture-1.binlog (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix HangDump to trigger after test session finishes Add acceptance test for hang dump triggering after test session finish Feb 18, 2026
Copilot AI requested a review from Youssef1313 February 18, 2026 13:38
Copilot AI and others added 2 commits February 20, 2026 10:55
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
@Youssef1313 Youssef1313 marked this pull request as ready for review February 20, 2026 10:40
@Youssef1313 Youssef1313 merged commit 899c209 into dev/ygerges/hangdump Feb 20, 2026
9 of 12 checks passed
@Youssef1313 Youssef1313 deleted the copilot/sub-pr-7392 branch February 20, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants