diff --git a/candidate_test.go b/candidate_test.go index a89632f..c76a3db 100644 --- a/candidate_test.go +++ b/candidate_test.go @@ -185,7 +185,7 @@ func TestCandidateLastSent(t *testing.T) { require.Equal(t, candidate.LastSent(), time.Time{}) now := time.Now() candidate.setLastSent(now) - require.Equal(t, candidate.LastSent(), now) + require.WithinDuration(t, candidate.LastSent(), now, 1*time.Microsecond) } func TestCandidateLastReceived(t *testing.T) { @@ -193,7 +193,7 @@ func TestCandidateLastReceived(t *testing.T) { require.Equal(t, candidate.LastReceived(), time.Time{}) now := time.Now() candidate.setLastReceived(now) - require.Equal(t, candidate.LastReceived(), now) + require.WithinDuration(t, candidate.LastReceived(), now, 1*time.Microsecond) } func TestCandidateFoundation(t *testing.T) {