Skip to content

chore: Use standardized test timeouts and delays #3291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Additional lints
  • Loading branch information
mafredri committed Jul 29, 2022
commit 8b84b09e9f95be63f58cf3c481cac7f094d0b079
3 changes: 2 additions & 1 deletion agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/agent"
"github.com/coder/coder/internal/testutil"
"github.com/coder/coder/peer"
"github.com/coder/coder/peerbroker"
"github.com/coder/coder/peerbroker/proto"
Expand Down Expand Up @@ -257,7 +258,7 @@ func TestAgent(t *testing.T) {
}
gotContent = string(content)
return true
}, 15*time.Second, 100*time.Millisecond)
}, testutil.WaitMedium, testutil.IntervalMedium)
require.Equal(t, content, strings.TrimSpace(gotContent))
})

Expand Down
2 changes: 1 addition & 1 deletion site/site_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestServingFiles(t *testing.T) {
defer srv.Close()

// Create a context
ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitShort)
defer cancelFunc()

testCases := []struct {
Expand Down