Merge pull request #110453 from claudiubelu/unittests-4

unittests: Fixes unit tests for Windows (part 4)
This commit is contained in:
Kubernetes Prow Robot
2022-12-16 06:16:16 -08:00
committed by GitHub
7 changed files with 178 additions and 23 deletions

View File

@@ -2827,9 +2827,7 @@ func collectAndComparePluginMetrics(t *testing.T, wantExtensionPoint, wantPlugin
if err != nil {
t.Errorf("Failed to get %s value, err: %v", metrics.PluginExecutionDuration.Name, err)
}
if value <= 0 {
t.Errorf("Expect latency to be greater than 0, got: %v", value)
}
checkLatency(t, value)
}
func collectAndCompareFrameworkMetrics(t *testing.T, wantExtensionPoint string, wantStatus framework.Code) {
@@ -2847,9 +2845,7 @@ func collectAndCompareFrameworkMetrics(t *testing.T, wantExtensionPoint string,
if err != nil {
t.Errorf("Failed to get %s value, err: %v", metrics.FrameworkExtensionPointDuration.Name, err)
}
if value <= 0 {
t.Errorf("Expect latency to be greater than 0, got: %v", value)
}
checkLatency(t, value)
}
func collectAndComparePermitWaitDuration(t *testing.T, wantRes string) {
@@ -2870,9 +2866,7 @@ func collectAndComparePermitWaitDuration(t *testing.T, wantRes string) {
if err != nil {
t.Errorf("Failed to get %s value, err: %v", metrics.PermitWaitDuration.Name, err)
}
if value <= 0 {
t.Errorf("Expect latency to be greater than 0, got: %v", value)
}
checkLatency(t, value)
}
}