From 83c1b42112647530a6870985d47712a3ef978d6f Mon Sep 17 00:00:00 2001 From: Piotr Piotrowski Date: Tue, 7 Feb 2023 11:49:00 +0100 Subject: [PATCH] Fix race condition in service API test --- micro/test/service_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/micro/test/service_test.go b/micro/test/service_test.go index 2eb64f978..4ffdd5834 100644 --- a/micro/test/service_test.go +++ b/micro/test/service_test.go @@ -1316,6 +1316,7 @@ func TestRequestRespond(t *testing.T) { handler := func(req micro.Request) { if errors.Is(test.withRespondError, micro.ErrRespond) { nc.Close() + return } if val := req.Headers().Get("key"); val != "value" { t.Fatalf("Expected headers in the request")