Race issue when running tests in parallel

#97 · closed · 2 comments

View on GitHub ↗

AndersSoee

When running tests with t.Parallel() in mockio v 2.0.2 we get race errors. ``` ================== WARNING: DATA RACE Write at 0x00c00053e0ec by goroutine 34: github.com/ovechkin-dm/go-dyno/proxy.Create() /Users/johndoe/go/pkg/mod/github.com/ovechkin-dm/[email protected]/proxy/proxy.go:81 +0x7a0 github.com/ovechkin-dm/go-dyno/pkg/dyno.DynamicByType() /Users/johndoe/go/pkg/mod/github.com/ovechkin-dm/[email protected]/pkg/dyno/api.go:36 +0x120 github.com/ovechkin-dm/mockio/v2/registry.Mock[go.shape.interface { DoSomething(context.Context, string) (string, error) }]() /Users/johndoe/go/pkg/mod/github.com/ovechkin-dm/mockio/[email protected]/registry/registry.go:40 +0x19c github.com/ovechkin-dm/mockio/v2/mock.Mock[go.shape.interface { DoSomething(context.Context, string) (string, error) }]() ``` Attached file to reproduce

Comments

AndersSoee

[test-zip.zip](https://github.com/user-attachments/files/21599934/test-zip.zip)

ovechkin-dm

Fixed in v2.0.3 Could you please verify if everything is working for you?