mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
chore: Use standardized test timeouts and delays (#3291)
This commit is contained in:
committed by
GitHub
parent
3d0febdd90
commit
4730c589fe
@ -4,12 +4,12 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/coderd/httpmw"
|
||||
"github.com/coder/coder/testutil"
|
||||
)
|
||||
|
||||
func TestRateLimit(t *testing.T) {
|
||||
@ -27,6 +27,6 @@ func TestRateLimit(t *testing.T) {
|
||||
rec := httptest.NewRecorder()
|
||||
rtr.ServeHTTP(rec, req)
|
||||
return rec.Result().StatusCode == http.StatusTooManyRequests
|
||||
}, 5*time.Second, time.Millisecond)
|
||||
}, testutil.WaitShort, testutil.IntervalFast)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user