Skip to content
This repository was archived by the owner on Dec 7, 2020. It is now read-only.

Commit 3f64894

Browse files
authored
Make equality fuzzy in TestGetWithin (#631)
This should prevent a sporadic test failure when the time.Now() value in the test initialization doesn't match with the time.Now() inside the getWithin function. Fixes #631
1 parent 48c72c0 commit 3f64894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ func TestGetWithin(t *testing.T) {
457457
},
458458
}
459459
for _, x := range cs {
460-
assert.Equal(t, x.Expected, getWithin(x.Expires, x.Percent))
460+
assert.InDelta(t, x.Expected, getWithin(x.Expires, x.Percent), 1000000001)
461461
}
462462
}
463463

0 commit comments

Comments
 (0)