Merge pull request #91451 from gaurav1086/scheduler_test_fix_goroutine_leak

scheduler_test: fix goroutine leak
This commit is contained in:
Kubernetes Prow Robot 2020-05-26 21:09:03 -07:00 committed by GitHub
commit 73641d35c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -544,11 +544,10 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) {
st.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New), st.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
st.RegisterPluginAsExtensions(nodeports.Name, nodeports.New, "Filter", "PreFilter"), st.RegisterPluginAsExtensions(nodeports.Name, nodeports.New, "Filter", "PreFilter"),
} }
scheduler, bindingChan, _ := setupTestSchedulerWithOnePodOnNode(t, queuedPodStore, scache, informerFactory, stop, pod, &node, fns...) scheduler, bindingChan, errChan := setupTestSchedulerWithOnePodOnNode(t, queuedPodStore, scache, informerFactory, stop, pod, &node, fns...)
waitPodExpireChan := make(chan struct{}) waitPodExpireChan := make(chan struct{})
timeout := make(chan struct{}) timeout := make(chan struct{})
errChan := make(chan error)
go func() { go func() {
for { for {
select { select {