Skip to content

Commit

Permalink
Merge pull request kubernetes#99907 from liggitt/cache-test-timeout
Browse files Browse the repository at this point in the history
Add test timeout to mutation detector test
  • Loading branch information
k8s-ci-robot authored Mar 7, 2021
2 parents c37073b + 877d889 commit dc493bb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ func TestMutationDetector(t *testing.T) {

informer := NewSharedInformer(lw, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer)
detector := &defaultCacheMutationDetector{
name: "name",
period: 1 * time.Second,
name: "name",
period: 1 * time.Second,
retainDuration: 2 * time.Minute,
failureFunc: func(message string) {
mutationFound <- true
},
Expand All @@ -72,6 +73,8 @@ func TestMutationDetector(t *testing.T) {

select {
case <-mutationFound:
case <-time.After(wait.ForeverTestTimeout):
t.Fatalf("failed waiting for mutating detector")
}

}

0 comments on commit dc493bb

Please sign in to comment.