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

This test would sometimes fail due to the diff sometimes exceeding `sessionMaxSeconds+1` by less than 1 second.
pull/4428/head
Michael Li 2 years ago
parent a48698a315
commit 391502770c

@ -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