From 10ac705eb1ae28f2e1f3f020e347be235328bf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 11 Apr 2022 13:41:27 -0300 Subject: [PATCH] Fix flaky test in jaegerremotesampling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #9113 Signed-off-by: Juraci Paixão Kröhling --- extension/jaegerremotesampling/extension_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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{