sq/libsq/core/retry/retry_test.go
Neil O'Toole 54a0155ed6
Deal with lots of connections, especially for sq inspect. (#186)
* wip: deal with lots of connections

* Clean up TestDatabase_SourceMetadata_concurrent

* Fixed error message
2023-04-08 12:09:27 -06:00

18 lines
330 B
Go

package retry_test
import (
"testing"
"time"
"github.com/neilotoole/sq/libsq/core/retry"
"github.com/stretchr/testify/require"
)
func TestJitter(t *testing.T) {
for i := 0; i < 1000; i++ {
got := retry.Jitter()
require.LessOrEqual(t, got, time.Millisecond*25)
require.GreaterOrEqual(t, got, time.Millisecond*5)
}
}