mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Add test timeout to mutation detector test
This commit is contained in:
parent
92c3349cef
commit
877d889ac2
@ -51,6 +51,7 @@ func TestMutationDetector(t *testing.T) {
|
||||
detector := &defaultCacheMutationDetector{
|
||||
name: "name",
|
||||
period: 1 * time.Second,
|
||||
retainDuration: 2 * time.Minute,
|
||||
failureFunc: func(message string) {
|
||||
mutationFound <- true
|
||||
},
|
||||
@ -72,6 +73,8 @@ func TestMutationDetector(t *testing.T) {
|
||||
|
||||
select {
|
||||
case <-mutationFound:
|
||||
case <-time.After(wait.ForeverTestTimeout):
|
||||
t.Fatalf("failed waiting for mutating detector")
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user