mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Move watchTimeout value to the top and add comments
This commit is contained in:
parent
0c8ae2abf3
commit
f0757ecd77
@ -32,6 +32,11 @@ import (
|
|||||||
"github.com/onsi/ginkgo"
|
"github.com/onsi/ginkgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// tests which use this appear to all pass within the given time
|
||||||
|
generalWatchTimeout = int64(60)
|
||||||
|
)
|
||||||
|
|
||||||
var _ = ginkgo.Describe("[sig-node] ConfigMap", func() {
|
var _ = ginkgo.Describe("[sig-node] ConfigMap", func() {
|
||||||
f := framework.NewDefaultFramework("configmap")
|
f := framework.NewDefaultFramework("configmap")
|
||||||
|
|
||||||
@ -178,8 +183,7 @@ var _ = ginkgo.Describe("[sig-node] ConfigMap", func() {
|
|||||||
|
|
||||||
ginkgo.By("setting a watch for the ConfigMap")
|
ginkgo.By("setting a watch for the ConfigMap")
|
||||||
// setup a watch for the ConfigMap
|
// setup a watch for the ConfigMap
|
||||||
resourceWatchTimeoutSeconds := int64(60)
|
resourceWatch, err := f.ClientSet.CoreV1().ConfigMaps(testNamespaceName).Watch(context.TODO(), metav1.ListOptions{LabelSelector: "test-configmap-static=true", TimeoutSeconds: &generalWatchTimeout})
|
||||||
resourceWatch, err := f.ClientSet.CoreV1().ConfigMaps(testNamespaceName).Watch(context.TODO(), metav1.ListOptions{LabelSelector: "test-configmap-static=true", TimeoutSeconds: &resourceWatchTimeoutSeconds})
|
|
||||||
framework.ExpectNoError(err, "Failed to setup watch on newly created ConfigMap")
|
framework.ExpectNoError(err, "Failed to setup watch on newly created ConfigMap")
|
||||||
|
|
||||||
resourceWatchChan := resourceWatch.ResultChan()
|
resourceWatchChan := resourceWatch.ResultChan()
|
||||||
@ -246,6 +250,7 @@ var _ = ginkgo.Describe("[sig-node] ConfigMap", func() {
|
|||||||
if watchEvent.Type == watch.Deleted {
|
if watchEvent.Type == watch.Deleted {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
fmt.Println("failed to find Deleted watchEvent")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user