Skip to content

Flaky: KeyedNotInParallelCrossPhaseTests kills its test process after 30 s on Windows CI (reflection mode) #7166

Closed

Description

@thomhurst

What happened

In run 39337171332 (PR #7150, modularpipeline (windows-latest)), both tests in tests/TUnit.Engine.Tests/Scheduling/KeyedNotInParallelCrossPhaseTests.cs failed in reflection mode with:

Command execution canceled. Underlying process (TUnit.TestProject.exe#13616) was forcefully terminated.
Command Input: ...TUnit.TestProject.exe --treenode-filter /*/*/Repro5700/* ... --reflection

The tests took 30.3 s, so the 30 s CancellationTokenSource in each test (WithForcefulCancellationToken) killed the child process. No test assertion failed. The same commit passed on ubuntu, and the tests pass locally in both modes in about 3.5 s. The PR does not touch scheduling.

Why

The 30 s budget covers starting a whole TUnit.TestProject process, plus reflection discovery of the full assembly. On a loaded Windows runner, that takes longer than 30 s, even though the filtered class itself runs in milliseconds.

Expected

These regression tests should fail only when the keyed NotInParallel scheduling actually serialises (the #5700 regression), not when process start-up and discovery are slow. Options:

  • raise the budget (for example to 2 min). A real deadlock still hangs well past that.
  • or measure the overlap inside the test classes (timestamps) instead of using wall-clock process time.

Reproduce

Not reliably reproducible locally. Seen once on Windows CI so far.

Activity

  1. added a commit that references this issue on Oct 20, 2026
    d6b1d40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions