@@ -46,8 +46,6 @@ var wantInstrumentationScope = instrumentation.Scope{
4646 Version : otelgrpc .Version (),
4747}
4848
49- const bufSize = 2048
50-
5149// newGrpcTest creats a grpc server, starts it, and executes all the calls, closes everything down.
5250func newGrpcTest (listener net.Listener , cOpt []grpc.DialOption , sOpt []grpc.ServerOption ) error {
5351 grpcServer := grpc .NewServer (sOpt ... )
@@ -108,18 +106,19 @@ func TestInterceptors(t *testing.T) {
108106
109107 listener , err := net .Listen ("tcp" , "127.0.0.1:0" )
110108 require .NoError (t , err , "failed to open port" )
111- err = newGrpcTest (listener , []grpc.DialOption {
112- //nolint:staticcheck // Interceptors are deprecated and will be removed in the next release.
113- grpc .WithUnaryInterceptor (otelgrpc .UnaryClientInterceptor (
114- otelgrpc .WithTracerProvider (clientUnaryTP ),
115- otelgrpc .WithMessageEvents (otelgrpc .ReceivedEvents , otelgrpc .SentEvents ),
116- )),
117- //nolint:staticcheck // Interceptors are deprecated and will be removed in the next release.
118- grpc .WithStreamInterceptor (otelgrpc .StreamClientInterceptor (
119- otelgrpc .WithTracerProvider (clientStreamTP ),
120- otelgrpc .WithMessageEvents (otelgrpc .ReceivedEvents , otelgrpc .SentEvents ),
121- )),
122- },
109+ err = newGrpcTest (listener ,
110+ []grpc.DialOption {
111+ //nolint:staticcheck // Interceptors are deprecated and will be removed in the next release.
112+ grpc .WithUnaryInterceptor (otelgrpc .UnaryClientInterceptor (
113+ otelgrpc .WithTracerProvider (clientUnaryTP ),
114+ otelgrpc .WithMessageEvents (otelgrpc .ReceivedEvents , otelgrpc .SentEvents ),
115+ )),
116+ //nolint:staticcheck // Interceptors are deprecated and will be removed in the next release.
117+ grpc .WithStreamInterceptor (otelgrpc .StreamClientInterceptor (
118+ otelgrpc .WithTracerProvider (clientStreamTP ),
119+ otelgrpc .WithMessageEvents (otelgrpc .ReceivedEvents , otelgrpc .SentEvents ),
120+ )),
121+ },
123122 []grpc.ServerOption {
124123 //nolint:staticcheck // Interceptors are deprecated and will be removed in the next release.
125124 grpc .UnaryInterceptor (otelgrpc .UnaryServerInterceptor (
0 commit comments