From 530b71d1e5adc99fbecef1148b2de2140255b7ef Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Fri, 27 Dec 2024 11:10:36 -0500 Subject: [PATCH] more-cleanup Signed-off-by: Yuri Shkuro --- receiver/jaegerreceiver/jaeger_agent_test.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/receiver/jaegerreceiver/jaeger_agent_test.go b/receiver/jaegerreceiver/jaeger_agent_test.go index 6a2f1409aa44..4f062410661e 100644 --- a/receiver/jaegerreceiver/jaeger_agent_test.go +++ b/receiver/jaegerreceiver/jaeger_agent_test.go @@ -13,7 +13,6 @@ import ( "github.com/jaegertracing/jaeger/cmd/agent/app/servers/thriftudp" "github.com/jaegertracing/jaeger/model" jaegerconvert "github.com/jaegertracing/jaeger/model/converter/thrift/jaeger" - "github.com/jaegertracing/jaeger/proto-gen/api_v2" "github.com/jaegertracing/jaeger/thrift-gen/agent" jaegerthrift "github.com/jaegertracing/jaeger/thrift-gen/jaeger" "github.com/stretchr/testify/assert" @@ -24,7 +23,6 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/receiver/receivertest" conventions "go.opentelemetry.io/collector/semconv/v1.27.0" - "google.golang.org/grpc" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" @@ -110,24 +108,6 @@ func TestJaegerAgentUDP_ThriftBinary_InvalidPort(t *testing.T) { require.NoError(t, jr.Shutdown(context.Background())) } -func initializeGRPCTestServer(t *testing.T, beforeServe func(server *grpc.Server), opts ...grpc.ServerOption) (*grpc.Server, net.Addr) { - server := grpc.NewServer(opts...) - lis, err := net.Listen("tcp", "localhost:0") - require.NoError(t, err) - beforeServe(server) - go func() { - err := server.Serve(lis) - assert.NoError(t, err) - }() - return server, lis.Addr() -} - -type mockSamplingHandler struct{} - -func (*mockSamplingHandler) GetSamplingStrategy(context.Context, *api_v2.SamplingStrategyParameters) (*api_v2.SamplingStrategyResponse, error) { - return &api_v2.SamplingStrategyResponse{StrategyType: api_v2.SamplingStrategyType_PROBABILISTIC}, nil -} - func testJaegerAgent(t *testing.T, agentEndpoint string, receiverConfig *configuration) { // 1. Create the Jaeger receiver aka "server" sink := new(consumertest.TracesSink)