Skip to content

plugin downloads can fail when parallel tests both request #116

Open

Description

@YOU54F

See pact-foundation/pact-net#551 (comment) for detail

Running dotnet test on the solution starts GrpcGreeterClient.Tests and GrpcGreeter.Tests in parallel (0.35s apart in the failed run), and both need the protobuf plugin. The driver's auto-install creates the plugin directory and writes pact-plugin.json before it downloads the binary, and the PLUGIN_REGISTER lock is in-process only. So the second process sees the manifest, assumes the plugin is installed, and fails to exec a binary that hasn't landed yet. Your Failed to creating plugins directory variant is the same race from the other side: fs::create_dir fails because the other process just created it.

Workaround: pre-install plugin, prior to tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions