diff options
Diffstat (limited to 'pkg/discord')
| -rw-r--r-- | pkg/discord/gateway/heartbeat_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/discord/gateway/heartbeat_test.go b/pkg/discord/gateway/heartbeat_test.go index f148d35..18862cf 100644 --- a/pkg/discord/gateway/heartbeat_test.go +++ b/pkg/discord/gateway/heartbeat_test.go @@ -16,7 +16,7 @@ func TestHeartBeats(t *testing.T) { // This is probably a flaky test, if it fails, change the error margin. // Also, Discord sets it's own interval acceptance margins, perhaps we should // use that instead of a hardcoded error margin. - errorMargin := 1 * time.Millisecond + errorMargin := 2 * time.Millisecond logger := zerolog.New(zerolog.NewTestWriter(t)) g := mocks.Gateway{} @@ -39,7 +39,7 @@ func TestHeartBeats(t *testing.T) { <-beats jitter := time.Since(start) - require.Less(t, jitter, interval, "the first jitter heartbeat should happen before the interval") + require.Less(t, jitter, interval+errorMargin, "the first jitter heartbeat should happen before the interval") start = time.Now() <-beats |
