Skip to content

Commit

Permalink
delint
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Jul 14, 2024
1 parent 28d3198 commit cbcd5bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"
"time"

"github.com/crossdock/crossdock-go/assert"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
Expand Down Expand Up @@ -187,7 +187,7 @@ func TestStartGRPC(t *testing.T) {
c := api_v2.NewSamplingManagerClient(conn)
response, err := c.GetSamplingStrategy(context.Background(), &api_v2.SamplingStrategyParameters{ServiceName: "foo"})
require.NoError(t, err)
require.Equal(t, response.ProbabilisticSampling.SamplingRate, 0.8)
require.Equal(t, 0.8, response.ProbabilisticSampling.SamplingRate)

require.NoError(t, ext.Shutdown(context.Background()))
}
Expand Down
13 changes: 6 additions & 7 deletions plugin/sampling/strategyprovider/adaptive/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"github.com/jaegertracing/jaeger/internal/metricstest"
"github.com/jaegertracing/jaeger/model"
span_model "github.com/jaegertracing/jaeger/model"
epmocks "github.com/jaegertracing/jaeger/plugin/sampling/leaderelection/mocks"
"github.com/jaegertracing/jaeger/storage/samplingstore/mocks"
)
Expand Down Expand Up @@ -172,13 +171,13 @@ func TestRecordThroughputFunc(t *testing.T) {
require.NoError(t, err)

// Testing non-root span
span := &span_model.Span{References: []span_model.SpanRef{{SpanID: span_model.NewSpanID(1), RefType: span_model.ChildOf}}}
span := &model.Span{References: []model.SpanRef{{SpanID: model.NewSpanID(1), RefType: model.ChildOf}}}
RecordThroughput(a, span, logger)
require.Empty(t, a.(*aggregator).currentThroughput)

// Testing span with service name but no operation
span.References = []span_model.SpanRef{}
span.Process = &span_model.Process{
span.References = []model.SpanRef{}
span.Process = &model.Process{
ServiceName: "A",
}
RecordThroughput(a, span, logger)
Expand All @@ -190,9 +189,9 @@ func TestRecordThroughputFunc(t *testing.T) {
require.Empty(t, a.(*aggregator).currentThroughput)

// Testing span with service name, operation, and probabilistic sampling tags
span.Tags = span_model.KeyValues{
span_model.String("sampler.type", "probabilistic"),
span_model.String("sampler.param", "0.001"),
span.Tags = model.KeyValues{
model.String("sampler.type", "probabilistic"),
model.String("sampler.param", "0.001"),
}
RecordThroughput(a, span, logger)
assert.EqualValues(t, 1, a.(*aggregator).currentThroughput["A"]["GET"].Count)
Expand Down

0 comments on commit cbcd5bb

Please sign in to comment.