Skip to content

Commit 534bff2

Browse files
authored
fix: coderd/prometheusmetrics wait for all metrics in require.Eventually (#5338)
1 parent 8ea0923 commit 534bff2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/prometheusmetrics/prometheusmetrics_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ func TestWorkspaces(t *testing.T) {
224224
if !ok {
225225
t.Fail()
226226
}
227-
require.Equal(t, count, int(metric.Gauge.GetValue()), "invalid count for %s", metric.Label[0].GetValue())
227+
if metric.Gauge.GetValue() != float64(count) {
228+
return false
229+
}
228230
sum += int(metric.Gauge.GetValue())
229231
}
230232
t.Logf("sum %d == total %d", sum, tc.Total)

0 commit comments

Comments
 (0)