Skip to content

Commit

Permalink
Merge pull request #1724 from kl52752/fix-for-affinity-test
Browse files Browse the repository at this point in the history
Fix last error logging in affinity tests
  • Loading branch information
k8s-ci-robot authored Jun 6, 2022
2 parents 5382feb + b1dabb6 commit cdf339e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/e2e-test/affinity_beta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,19 @@ func TestAffinityBeta(t *testing.T) {
}); err != nil {
t.Errorf("CloudV1beta1().BackendConfigs(%q).Update(%#v) = %v, want nil", s.Namespace, transition, err)
}

var logicErr error
if waitErr := wait.Poll(transitionPollInterval, transitionPollTimeout, func() (bool, error) {
gclb, err = fuzz.GCLBForVIP(context.Background(), Framework.Cloud, params)
if err != nil {
t.Logf("Error getting GCP resources for LB with IP(%q): %v", vip, err)
gclb, logicErr = fuzz.GCLBForVIP(context.Background(), Framework.Cloud, params)
if logicErr != nil {
t.Logf("Error getting GCP resources for LB with IP(%q): %v", vip, logicErr)
return false, nil
}
if err := verifyAffinity(t, gclb, s.Namespace, svcName, transition.affinity, transition.ttl); err != nil {
if logicErr = verifyAffinity(t, gclb, s.Namespace, svcName, transition.affinity, transition.ttl); logicErr != nil {
return false, nil
}
return true, nil
}); waitErr != nil {
t.Errorf("Error waiting for BackendConfig affinity transition propagation to GCLB, last seen error: %v", err)
t.Errorf("Error waiting for BackendConfig affinity transition propagation to GCLB, last seen error: %v", logicErr)
}
})
}
Expand Down

0 comments on commit cdf339e

Please sign in to comment.