From 75b24a245850ff051b9952f2b57e2f5d2f3e0780 Mon Sep 17 00:00:00 2001 From: wafuwafu13 Date: Mon, 11 Mar 2024 21:26:22 +0000 Subject: [PATCH] test: exclude ErrServerClosed Signed-off-by: wafuwafu13 --- .../api/destination/endpoint_profile_translator_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controller/api/destination/endpoint_profile_translator_test.go b/controller/api/destination/endpoint_profile_translator_test.go index a44e1ce962f1f..d79a54f9d4f95 100644 --- a/controller/api/destination/endpoint_profile_translator_test.go +++ b/controller/api/destination/endpoint_profile_translator_test.go @@ -1,8 +1,10 @@ package destination import ( + "errors" "testing" "time" + "net/http" pb "github.com/linkerd/linkerd2-proxy-api/go/destination" "github.com/linkerd/linkerd2/controller/api/destination/watcher" @@ -113,8 +115,9 @@ func TestEndpointProfileTranslator(t *testing.T) { // The queue should be full and the next update should fail. t.Logf("Queue length=%d capacity=%d", translator.queueLen(), updateQueueCapacity) if err := translator.Update(podAddr); err == nil { - t.Fatalf("Expected update to fail; queue=%d; capacity=%d", translator.queueLen(), updateQueueCapacity) - + if !errors.Is(err, http.ErrServerClosed) { + t.Fatalf("Expected update to fail; queue=%d; capacity=%d", translator.queueLen(), updateQueueCapacity) + } } select {