Skip to content

Commit 0ebf7c6

Browse files
committed
Add delay for UDP service test stability.
1 parent f74dc15 commit 0ebf7c6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/internal/integration/service_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,13 @@ func (s *IntegrationTestSuite) TestServiceEndToEndUDP() {
404404
s.Require().Len(service.Status.LoadBalancer.Ingress, 2)
405405
addr := service.Status.LoadBalancer.Ingress[0].IP
406406

407+
// We have to wait a few seconds until the configured udp-connect
408+
// health monitor reports the services as up. Depending on the
409+
// timings, we could see i/o timeouts otherwise.
410+
// Sleeping 9 seconds allows for at least 3 successful up probes,
411+
// which is one more than required.
412+
time.Sleep(3 * 3 * time.Second)
413+
407414
// Verify UDP service responses using Go's UDP client
408415
s.T().Log("Verifying UDP echo service responses")
409416
errors := 0
@@ -412,7 +419,7 @@ func (s *IntegrationTestSuite) TestServiceEndToEndUDP() {
412419
// Create UDP client
413420
conn, err := net.Dial("udp", fmt.Sprintf("%s:5000", addr))
414421
s.Require().NoError(err)
415-
s.T().Log("UDP client connected successfully")
422+
s.T().Log("UDP client created successfully")
416423
defer conn.Close()
417424

418425
// Set read timeout

0 commit comments

Comments
 (0)