Skip to content

Conversation

@mdaigle
Copy link
Contributor

@mdaigle mdaigle commented Dec 5, 2025

Description

Poor test design and resource contention sometimes lead to test cases that run longer than desired. In other cases, tests are genuinely stuck due to deadlocks. In these situations, it's best to kill the test case and rerun. Unfortunately, because we use xunit2 and vstest, we're stuck with rerunning the whole test suite as there's no option to rerun only failing tests.

All the same tests are run, but they should now "fail fast" instead of sitting and consuming resources.

I'll leave this PR open for a bit and rerun the pipeline on it to see how useful this behavior is in practice.

Copilot AI review requested due to automatic review settings December 5, 2025 23:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a 5-minute timeout to all test executions to handle poorly designed tests, resource contention, and deadlock scenarios. The --blame-hang-timeout 5m flag causes tests to be aborted if they exceed the specified duration, enabling fail-fast behavior instead of consuming resources indefinitely.

Key Changes

  • Added --blame-hang-timeout 5m parameter to all test execution targets in build.proj
  • Applied consistently across unit, functional, and manual tests for both Windows and Unix platforms

@paulmedynski
Copy link
Contributor

We can also consider an approach like this to get start/end logging, and per-test re-runs on hangs or transient failures:

https://andrewlock.net/tracking-down-a-hanging-xunit-test-in-ci-building-a-custom-test-framework/

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.

3 participants