Merge pull request #91185 from gaurav1086/fix_race_in_cacher_whitebox

Apiserver: Fix data race in cacher whitebox test
This commit is contained in:
Kubernetes Prow Robot
2020-06-03 14:40:43 -07:00
committed by GitHub

View File

@@ -728,7 +728,7 @@ func testCacherSendBookmarkEvents(t *testing.T, allowWatchBookmarks, expectedBoo
go func() {
deadline := time.Now().Add(time.Second)
for i := 0; time.Now().Before(deadline); i++ {
err = cacher.watchCache.Add(&examplev1.Pod{
err := cacher.watchCache.Add(&examplev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("pod-%d", i),
Namespace: "ns",