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

beacon-client: fix concurrency issues in tests #2049

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from

Conversation

iurii-ssv
Copy link
Contributor

I've noticed there are couple of issues:

  • t *testing.T is not meant to be used concurrently:
// T is a type passed to Test functions to manage test state and support formatted test logs.
//
// A test ends when its Test function returns or calls any of the methods
// FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as
// the Parallel method, must be called only from the goroutine running the
// Test function.
//
// The other reporting methods, such as the variations of Log and Error,
// may be called simultaneously from multiple goroutines.
type T struct {
2025/02/27 10:15:16 http: superfluous response.WriteHeader call from github.com/ssvlabs/ssv/beacon/goclient.mockServer.func1 (goclient_test.go:264)

this PR should address both

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.9%. Comparing base (13fbc84) to head (8985884).

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants