Skip to content

Commit

Permalink
test: exclude ErrServerClosed
Browse files Browse the repository at this point in the history
Signed-off-by: wafuwafu13 <[email protected]>
  • Loading branch information
wafuwafu13 committed Mar 11, 2024
1 parent d052fcf commit 75b24a2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 75b24a2

Please sign in to comment.