diff --git a/pkg/tcpip/transport/tcp/test/e2e/tcp_test.go b/pkg/tcpip/transport/tcp/test/e2e/tcp_test.go index e78c6a6ab..58d8cf37c 100644 --- a/pkg/tcpip/transport/tcp/test/e2e/tcp_test.go +++ b/pkg/tcpip/transport/tcp/test/e2e/tcp_test.go @@ -4177,7 +4177,14 @@ func TestMaxRTO(t *testing.T) { checker.TCPFlagsMatch(header.TCPFlagAck, ^header.TCPFlagPsh), )) if elapsed := time.Since(start); elapsed.Round(time.Second).Seconds() != rto.Seconds() { - t.Errorf("Retransmit interval not capped to MaxRTO(%s). %s", rto, elapsed) + newRto := float64(rto / time.Millisecond) + if i == 0 { + newRto /= 2 + } + curRto := float64(elapsed.Round(time.Millisecond).Milliseconds()) + if math.Abs(newRto-curRto) > 10 { + t.Errorf("Retransmit interval not capped to RTO(%v). %v", newRto, curRto) + } } } }