Skip to content
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
11 changes: 11 additions & 0 deletions pkg/internal/integration/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,11 @@ func (s *IntegrationTestSuite) TestServiceEndToEndDualProtocol() {
s.Require().Len(svc.Status.LoadBalancer.Ingress, 2)
addr := svc.Status.LoadBalancer.Ingress[0].IP

// We have to wait a few seconds until the configured health monitor reports the services as up.
// Sleeping 9 seconds allows for at least 3 successful up probes,
// which is one more than required.
time.Sleep(3 * 3 * time.Second)

// Create custom resolver pointing to the DNS service
resolver := &net.Resolver{
PreferGo: true,
Expand Down Expand Up @@ -959,6 +964,9 @@ func (s *IntegrationTestSuite) TestServiceTrafficPolicyLocal() {

// Now expect to see an IP address from the node's private network
assertPrefix(addr, &local_policy_prefix)
// Allow the load balancer to stabilize after switching traffic policy.
// Without this, we may see connection resets during rapid assertions.
time.Sleep(5 * time.Second)
assertFastResponses(addr, &local_policy_prefix)

// Go back to the Cluster policy
Expand All @@ -975,6 +983,9 @@ func (s *IntegrationTestSuite) TestServiceTrafficPolicyLocal() {
s.Require().NotNil(service)

assertPrefix(addr, &cluster_policy_prefix)
// Allow the load balancer to stabilize after switching traffic policy.
// Without this, we may see connection resets during rapid assertions.
time.Sleep(5 * time.Second)
assertFastResponses(addr, &cluster_policy_prefix)
}

Expand Down