Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Test: Ignore connection refused errors when WaitForIngress() is called. #588

Merged
merged 1 commit into from
Dec 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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