Skip to content

Conversation

@Jeet-Srivastava
Copy link

Enhance timeout error messages to include the actual test duration when available. This provides developers with more context when debugging slow tests that exceed their timeout threshold.

Changes:

  • Modified _timeoutError() to accept optional duration parameter
  • Track start time on runnable instance to calculate duration
  • Include duration in error message when timeout fires or test finishes late
  • Add comprehensive tests for duration inclusion in timeout errors

The error message now includes: 'Test ran for Xms' when duration is available, making it easier to understand how much longer the test took than the timeout.

Enhance timeout error messages to include the actual test duration when
available. This provides developers with more context when debugging slow
tests that exceed their timeout threshold.

Changes:
- Modified _timeoutError() to accept optional duration parameter
- Track start time on runnable instance to calculate duration
- Include duration in error message when timeout fires or test finishes late
- Add comprehensive tests for duration inclusion in timeout errors

The error message now includes: 'Test ran for Xms' when duration is available,
making it easier to understand how much longer the test took than the timeout.

Fixes: #(issue number if applicable)
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 23, 2025

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Jeet-Srivastava / name: Jeet Srivastava (a961f6f)

@saranganet
Copy link
Contributor

seems good!
I myself was gonna do that, great tho u did it.

@mark-wiemer mark-wiemer added the semver-major implementation requires increase of "major" version number; "breaking changes" label Nov 23, 2025
@mark-wiemer mark-wiemer added this to the v13.0.0 milestone Nov 23, 2025
@mark-wiemer
Copy link
Member

@Jeet-Srivastava can you open an issue so we can consider the use-cases here? Changing reporter output is usually a semver-major change which would require some thought as to "do we make this a CLI flag first?" and other questions

@mark-wiemer mark-wiemer added the status: in triage a maintainer should (re-)triage (review) this issue label Nov 23, 2025
@Jeet-Srivastava
Copy link
Author

Hi @mark-wiemer, as you can see @saranganet has raised the issue, and i have replied to him there.
You can see that and then we can discuss further on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major implementation requires increase of "major" version number; "breaking changes" status: in triage a maintainer should (re-)triage (review) this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants