Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capturing elapsed time of interrupted test cases due to timeout #4253

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

linzhp
Copy link
Contributor

@linzhp linzhp commented Feb 8, 2025

What type of PR is this?
Feature

What does this PR do? Why is it needed?
When a test case is interrupted at timeout, we don't have the pass/fail/skip event to report elapsed time. However, we can parse them from the error message at the end to figure it out. The error message looks like:

panic: test timed out after 8s
        running tests:
                TestReport (8s)
                TestReport/test_3 (2s)

Also, instead of reporting those test cases as "No pass/skip/fail event found for test", we can now report them as "Interrupted".

Verified

This commit was signed with the committer’s verified signature.
mkniewallner Mathieu Kniewallner
@linzhp linzhp requested a review from jayconrod February 8, 2025 06:18
Copy link
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

Nice, I love contained hacks with a big impact on usability!

@linzhp linzhp merged commit 8feaa93 into bazel-contrib:master Feb 8, 2025
1 check passed
@linzhp linzhp deleted the timeout branch February 8, 2025 22:11
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.

None yet

2 participants