Skip to content

Commit acd104c

Browse files
committed
Remove SuperShort duration as extraneous
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent b118044 commit acd104c

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

coderd/prometheusmetrics/prometheusmetrics_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func TestWorkspaceStatuses(t *testing.T) {
150150
t.Run(tc.Name, func(t *testing.T) {
151151
t.Parallel()
152152
registry := prometheus.NewRegistry()
153-
closeFunc, err := prometheusmetrics.Workspaces(context.Background(), slogtest.Make(t, nil), registry, tc.Database(), testutil.IntervalFast)
153+
closeFunc, err := prometheusmetrics.Workspaces(context.Background(), slogtest.Make(t, nil).Leveled(slog.LevelWarn), registry, tc.Database(), testutil.IntervalFast)
154154
require.NoError(t, err)
155155
t.Cleanup(closeFunc)
156156

@@ -179,7 +179,7 @@ func TestWorkspaceStatuses(t *testing.T) {
179179
}
180180
t.Logf("sum %d == total %d", sum, tc.Total)
181181
return sum == tc.Total
182-
}, testutil.WaitSuperShort, testutil.IntervalFast)
182+
}, testutil.WaitShort, testutil.IntervalFast)
183183
})
184184
}
185185
}
@@ -270,7 +270,7 @@ func TestWorkspaceDetails(t *testing.T) {
270270
t.Logf("status series = %d, expected == %d", stSum, tc.ExpectedSeries)
271271
t.Logf("workspace series = %d, expected == %d", len(wMap), tc.ExpectedWorkspaces)
272272
return stSum == tc.ExpectedSeries && len(wMap) == tc.ExpectedWorkspaces
273-
}, testutil.WaitSuperShort, testutil.IntervalFast)
273+
}, testutil.WaitShort, testutil.IntervalFast)
274274
})
275275
}
276276
}

testutil/duration.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import (
99
// Constants for timing out operations, usable for creating contexts
1010
// that timeout or in require.Eventually.
1111
const (
12-
WaitSuperShort = time.Second
13-
WaitShort = 10 * time.Second
14-
WaitMedium = 15 * time.Second
15-
WaitLong = 25 * time.Second
16-
WaitSuperLong = 60 * time.Second
12+
WaitShort = 10 * time.Second
13+
WaitMedium = 15 * time.Second
14+
WaitLong = 25 * time.Second
15+
WaitSuperLong = 60 * time.Second
1716
)
1817

1918
// Constants for delaying repeated operations, e.g. in

testutil/duration_windows.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import "time"
77
//
88
// Windows durations are adjusted for slow CI workers.
99
const (
10-
WaitSuperShort = time.Second
11-
WaitShort = 15 * time.Second
12-
WaitMedium = 20 * time.Second
13-
WaitLong = 35 * time.Second
14-
WaitSuperLong = 120 * time.Second
10+
WaitShort = 15 * time.Second
11+
WaitMedium = 20 * time.Second
12+
WaitLong = 35 * time.Second
13+
WaitSuperLong = 120 * time.Second
1514
)
1615

1716
// Constants for delaying repeated operations, e.g. in

0 commit comments

Comments
 (0)