Merge pull request #9540 from prezha/increase-logs_test-time-diff-tolerance

increase logs_test time diff tolerance
pull/9544/head
Thomas Strömberg 2020-10-23 11:42:25 -07:00 committed by GitHub
commit a68042e02a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ func TestTimeCommandLogs(t *testing.T) {
if !ok {
t.Fatalf("expected log %s but didn't find it", log)
}
// Let's give a little wiggle room so we don't fail if time is 3 and actualTime is 2.999
if actualTime < time && time-actualTime > 0.001 {
// Let's give a little wiggle room so we don't fail if time is 3 and actualTime is 2.99...
if actualTime < time && time-actualTime > 0.01 {
t.Fatalf("expected log \"%s\" to take more time than it actually did. got %v, expected > %v", log, actualTime, time)
}
}