Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock: avoid data races in Arguments.Diff #1598

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 14, 2024

  1. avoid data races in Arguments.Diff

    Fixes a concurrency issue that would lead to testify mocks producing data races
    detected by go test -race. These data races would occur whenever a mock pointer
    argument was concurrently modified. The reason being that Arguments.Diff uses
    the %v format specifier to get a presentable string for the argument. This also
    traverses the pointed-to data structure, which would lead to the data race.
    
    Signed-off-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com>
    petergardfjall committed May 14, 2024
    Configuration menu
    Copy the full SHA
    e348acb View commit details
    Browse the repository at this point in the history