Merge pull request #82733 from yutedz/webhook-invocation-len

Check the length of recorder.invocations
This commit is contained in:
Kubernetes Prow Robot 2019-09-16 12:40:52 -07:00 committed by GitHub
commit e2e3de233d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -327,10 +327,12 @@ func testWebhookTimeout(t *testing.T, watchCache bool) {
} }
} }
if len(recorder.invocations) > len(tt.expectInvocations) {
for _, invocation := range recorder.invocations[len(tt.expectInvocations):] { for _, invocation := range recorder.invocations[len(tt.expectInvocations):] {
t.Errorf("unexpected invocation of %s", invocation.path) t.Errorf("unexpected invocation of %s", invocation.path)
} }
} }
}
}) })
} }
} }