Skip to content

MTP (Microsoft Testing Platform) with NUnit causes CI hangs #130

@jas88

Description

@jas88

Summary

Microsoft Testing Platform (MTP) with NUnit3TestAdapter 6.0.1 causes the test process to hang indefinitely after all tests complete. Tests pass successfully, but MTP never exits, requiring external termination.

Details

  • NUnit3TestAdapter: 6.0.1
  • NUnit: 4.4.0
  • Microsoft.NET.Test.Sdk: 18.0.1
  • .NET SDK: 10.0.101

Observed Behavior

  1. Tests run and complete successfully (e.g., 1998 passed, 182 skipped)
  2. NUnit reports "Test execution complete"
  3. MTP continues running, printing status updates every 3 seconds
  4. Process never exits - must be killed externally (timeout, Ctrl+C, etc.)

Workarounds Tried (None Worked)

  • [assembly: NonParallelizable] - Disabling parallel tests
  • --hangdump --hangdump-timeout 2m - HangDump extension (doesn't trigger because tests complete, no "inactivity")
  • Preview packages Microsoft.Testing.Platform.MSBuild 2.1.0-preview.26076.3 with Linux HangDump fix
  • Parsing test output to detect pass/fail and allowing timeout to kill process

Related Issues

Current Resolution

Reverted to VSTest mode by removing MTP configuration from global.json. This allows CI to pass.

Future Action

Re-evaluate MTP when the NUnit adapter issues are resolved. The MTP infrastructure offers benefits (HangDump, better diagnostics), but the shutdown hang makes it unusable for CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions