test(e2e): Add extra buffer in -session-max-seconds test (#4428)

This test would sometimes fail due to the diff sometimes exceeding `sessionMaxSeconds+1` by less than 1 second.
pull/4431/head
Michael Li 2 years ago committed by GitHub
parent a48698a315
commit 4d344edecc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -162,6 +162,6 @@ func TestCliTcpTargetConnectTargetWithSessionMaxSecondsRejectNew(t *testing.T) {
// Ensure that the session did not run for longer than the time limit
diff := end.Sub(start).Seconds()
require.Less(t, diff, float64(sessionMaxSeconds+1))
require.Less(t, diff, float64(sessionMaxSeconds+2))
require.Greater(t, diff, float64(sessionMaxSeconds-1))
}

Loading…
Cancel
Save