Skip to content

Faker instance is not thread-safe #6

@AlekSi

Description

@AlekSi

Faker instance can't be used by different goroutines in parallel tests (t.Parallel()), there is a data race.
I propose to make it thread-safe, since creating new instance in every test is a waste of resources.
Alternatively, explicitly document that it's not thread-safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions