Skip to content

testing/synctest: panics result in wrong test duration #73852

Open
@neild

Description

@neild

When a test function run by synctest.Test panics, the testing package's panic handler incorrectly uses the bubble's clock to record the duration of test functions, resulting in output like:

--- FAIL: TestNewClientServerTest (-801346049.16s)
    --- FAIL: TestNewClientServerTest/synctest (-801346049.16s)
        --- FAIL: TestNewClientServerTest/synctest/h1 (-801346049.16s)
            --- FAIL: TestNewClientServerTest/synctest/h1 (0.00s)
panic: some panic [recovered, repanicked]

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions