Skip to content

Different data when tests run in parallel #156

Open
@e180973

Description

@e180973

Using filler.SetRandomSeed(1000).Setup() my test consistently generates identical data for all fields, as long as i specify certain values like .OnType().Use(DefaultDateTimeOffset).

However, when my tests are run in parallel i seem to get different results for strings and ints. My workaround right now is locking string/int values like this
.OnType().Use(true)
.OnType<bool?>().Use(true)
.OnType().Use(1)
.OnType<int?>().Use(1)
.OnType().Use("string")
.OnType<string?>().Use("string")

This is "ok", but then I don't quite understand the point of SetRandomSeed. Is this the way it's supposed to work?

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