fix: coderd/prometheusmetrics wait for all metrics in require.Eventually (#5338)

This commit is contained in:
Marcin Tojek
2022-12-07 17:50:17 +01:00
committed by GitHub
parent 8ea09235f9
commit 534bff2ff5

View File

@ -224,7 +224,9 @@ func TestWorkspaces(t *testing.T) {
if !ok {
t.Fail()
}
require.Equal(t, count, int(metric.Gauge.GetValue()), "invalid count for %s", metric.Label[0].GetValue())
if metric.Gauge.GetValue() != float64(count) {
return false
}
sum += int(metric.Gauge.GetValue())
}
t.Logf("sum %d == total %d", sum, tc.Total)