Skip to content

Commit

Permalink
Merge pull request #588 from rramkumar1/patch-25
Browse files Browse the repository at this point in the history
Upgrade Test: Ignore connection refused errors when WaitForIngress() is called.
  • Loading branch information
k8s-ci-robot authored Dec 21, 2018
2 parents 758118f + a0f50ce commit 34e11f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/e2e-test/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
"context"
"strings"
"testing"

"github.com/kr/pretty"
Expand Down Expand Up @@ -68,7 +69,6 @@ func TestUpgrade(t *testing.T) {
runs := 0
// needUpdate indicates that the Ingress sync has NOT yet been triggered
needUpdate := true
// Framework.shutdown() kills this loop.
for {
if s.MasterUpgraded() && needUpdate {
t.Logf("Detected master upgrade, adding a path to Ingress to force Ingress update")
Expand Down Expand Up @@ -99,6 +99,12 @@ func TestUpgrade(t *testing.T) {
}
ing, err := e2e.WaitForIngress(s, tc.ing, options)
if err != nil {
if strings.Contains(err.Error(), "connection refused") {
// We ignore any connection refused errors because there is an
// unavoidable race condition between when a master upgrade is
// triggered and when WaitForIngress() is called.
continue
}
t.Fatalf("error waiting for Ingress to stabilize: %v", err)
}

Expand Down

0 comments on commit 34e11f7

Please sign in to comment.