fixup! Test workqueue metrics

change units to seconds

Kubernetes-commit: 578962d934df19cb2cb7ec0536dcb76f53951e68
This commit is contained in:
Daniel Smith
2018-11-10 18:46:43 -08:00
committed by Kubernetes Publisher
parent e403f1715c
commit cc2731ad7e
2 changed files with 16 additions and 14 deletions

View File

@@ -113,7 +113,7 @@ func (m *testMetricsProvider) NewWorkDurationMetric(name string) SummaryMetric {
return &m.duration
}
func (m *testMetricsProvider) NewUnfinishedWorkMicrosecondsMetric(name string) SettableGaugeMetric {
func (m *testMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) SettableGaugeMetric {
return &m.unfinished
}
@@ -229,7 +229,7 @@ func TestMetrics(t *testing.T) {
c.Step(time.Millisecond)
<-ch
mp.unfinished.notifyCh = nil
if e, a := 1000.0, mp.unfinished.gaugeValue(); e != a {
if e, a := .001, mp.unfinished.gaugeValue(); e != a {
t.Errorf("expected %v, got %v", e, a)
}