Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/tools/github.com/vektr…
Browse files Browse the repository at this point in the history
…a/mockery/v2-2.34.1
  • Loading branch information
artemgavrilov authored Sep 26, 2023
2 parents 5981f1d + a407ad5 commit f504a1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions managed/services/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ func (s *Service) processSendCh(ctx context.Context) {
reportsBuf = []*pmmv1.ServerMetric{}
reportsBufSync.Unlock()

go func() {
err := s.send(sendCtx, &reporter.ReportRequest{
go func(ctx context.Context) {
err := s.send(ctx, &reporter.ReportRequest{
Metrics: reportsToSend,
})
if err != nil {
Expand All @@ -201,7 +201,7 @@ func (s *Service) processSendCh(ctx context.Context) {
}

s.l.Debug("Telemetry info sent.")
}()
}(sendCtx)
}
case <-ctx.Done():
if cancel != nil {
Expand Down
3 changes: 1 addition & 2 deletions managed/services/telemetry/telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"context"
"io/fs"
"os"
"reflect"
"testing"
"time"

Expand Down Expand Up @@ -264,7 +263,7 @@ func initMockTelemetrySender(t *testing.T, expectedReport *reporter.ReportReques
var mockTelemetrySender mockSender
mockTelemetrySender.Test(t)
mockTelemetrySender.On("SendTelemetry",
mock.AnythingOfType(reflect.TypeOf(context.TODO()).Name()),
mock.Anything,
mock.MatchedBy(func(report *reporter.ReportRequest) bool {
return matchExpectedReport(report, expectedReport)
}),
Expand Down

0 comments on commit f504a1f

Please sign in to comment.