Skip to content

[BUG] testing.TestProvider can't reliably be used when tests invoke separate goroutines #436

@hairyhenderson

Description

@hairyhenderson

Observed behavior

Currently the testing.TestProvider makes use of goroutine-local variables to store the current test's name, so that the provider can be scoped to a given test.

This has the unfortunate side-effect that tests that need to launch goroutines may panic with the unable to detect test name; be sure to call UsingFlags in the scope of a test (in T.run)!") message.

Expected Behavior

Ideally, the TestProvider should be able to operate reliably when goroutines are involved

Steps to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions