-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix atomic usage in tests #6964
Conversation
@@ -246,7 +246,7 @@ type TestAggregator struct { | |||
func (t *TestAggregator) Description() string { return "" } | |||
func (t *TestAggregator) SampleConfig() string { return "" } | |||
func (t *TestAggregator) Reset() { | |||
atomic.StoreInt64(&t.sum, 0) | |||
t.sum := 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atomic not be required, the RunningAggregator should prevent concurrent calls.
@@ -230,36 +227,6 @@ func TestParseConfig(t *testing.T) { | |||
require.NotNil(t, tab) | |||
} | |||
|
|||
func TestThrottledExecutor(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is racy and somewhat slow to run, I don't think it provides enough value to keep. FYI @prydin
9626143
to
41e5d30
Compare
related: #6960
Required for all PRs: