scheduler_test: fix goroutine leak

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Re-use errchan from setupTestSchedulerWithOnePodOnNode

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
This commit is contained in:
Gaurav Singh 2020-05-26 09:29:06 -04:00
parent 4e8b56e667
commit a4e5629320

View File

@ -543,11 +543,10 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) {
st.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
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{})
timeout := make(chan struct{})
errChan := make(chan error)
go func() {
for {
select {