mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #91185 from gaurav1086/fix_race_in_cacher_whitebox
Apiserver: Fix data race in cacher whitebox test
This commit is contained in:
commit
c18bc7e9f7
@ -728,7 +728,7 @@ func testCacherSendBookmarkEvents(t *testing.T, allowWatchBookmarks, expectedBoo
|
|||||||
go func() {
|
go func() {
|
||||||
deadline := time.Now().Add(time.Second)
|
deadline := time.Now().Add(time.Second)
|
||||||
for i := 0; time.Now().Before(deadline); i++ {
|
for i := 0; time.Now().Before(deadline); i++ {
|
||||||
err = cacher.watchCache.Add(&examplev1.Pod{
|
err := cacher.watchCache.Add(&examplev1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: fmt.Sprintf("pod-%d", i),
|
Name: fmt.Sprintf("pod-%d", i),
|
||||||
Namespace: "ns",
|
Namespace: "ns",
|
||||||
|
Loading…
Reference in New Issue
Block a user