Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test/kubelet]: Fix deadlock in watch manager test #92920

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions test/integration/kubelet/watch_manager_test.go
Expand Up @@ -40,6 +40,7 @@ func TestWatchBasedManager(t *testing.T) {
server := kubeapiservertesting.StartTestServerOrDie(t, nil, nil, framework.SharedEtcd())
defer server.TearDownFn()

const n = 10
server.ClientConfig.QPS = 10000
server.ClientConfig.Burst = 10000
client, err := kubernetes.NewForConfig(server.ClientConfig)
Expand All @@ -65,8 +66,8 @@ func TestWatchBasedManager(t *testing.T) {
// create 1000 secrets in parallel
t.Log(time.Now(), "creating 1000 secrets")
wg := sync.WaitGroup{}
errCh := make(chan error, 1)
for i := 0; i < 10; i++ {
errCh := make(chan error, n)
for i := 0; i < n; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
Expand All @@ -93,8 +94,8 @@ func TestWatchBasedManager(t *testing.T) {

// fetch all secrets
wg = sync.WaitGroup{}
errCh = make(chan error, 1)
for i := 0; i < 10; i++ {
errCh = make(chan error, n)
for i := 0; i < n; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
Expand Down