diff --git a/extension/jaegerremotesampling/extension_test.go b/extension/jaegerremotesampling/extension_test.go index 49dc22540dae..afc915c976d6 100644 --- a/extension/jaegerremotesampling/extension_test.go +++ b/extension/jaegerremotesampling/extension_test.go @@ -59,14 +59,15 @@ func TestStartAndShutdownRemote(t *testing.T) { // create the mock server server := grpc.NewServer() + + // register the service + api_v2.RegisterSamplingManagerServer(server, &samplingServer{}) + go func() { err = server.Serve(lis) require.NoError(t, err) }() - // register the service - api_v2.RegisterSamplingManagerServer(server, &samplingServer{}) - // create the config, pointing to the mock server cfg := createDefaultConfig().(*Config) cfg.Source.Remote = &configgrpc.GRPCClientSettings{