Skip to content

test: fix flaky tests #16799

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 1 commit into from
Mar 4, 2025
Merged
Changes from all commits
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
test: fix flaky tests
  • Loading branch information
evgeniy-scherbina committed Mar 4, 2025
commit 8a1ab104b8b52ddac6e097f5a9d3df6584a0f989
5 changes: 2 additions & 3 deletions coderd/database/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2169,9 +2169,6 @@ func TestExpectOne(t *testing.T) {
func TestGetProvisionerJobsByIDsWithQueuePosition(t *testing.T) {
t.Parallel()

now := dbtime.Now()
ctx := testutil.Context(t, testutil.WaitShort)

testCases := []struct {
name string
jobTags []database.StringMap
Expand Down Expand Up @@ -2393,6 +2390,8 @@ func TestGetProvisionerJobsByIDsWithQueuePosition(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
db, _ := dbtestutil.NewDB(t)
now := dbtime.Now()
ctx := testutil.Context(t, testutil.WaitShort)

// Create provisioner jobs based on provided tags:
allJobs := make([]database.ProvisionerJob, len(tc.jobTags))
Expand Down
Loading