Skip to content

Commit

Permalink
test: Exclude ErrServerClosed
Browse files Browse the repository at this point in the history
  • Loading branch information
wafuwafu13 committed Mar 11, 2024
1 parent d052fcf commit d4aac8a
Showing 1 changed file with 5 additions and 2 deletions.
@@ -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 d4aac8a

Please sign in to comment.