Skip to content

Commit a4e5629

Browse files
committed
scheduler_test: fix goroutine leak
Signed-off-by: Gaurav Singh <[email protected]> Re-use errchan from setupTestSchedulerWithOnePodOnNode Signed-off-by: Gaurav Singh <[email protected]>
1 parent 4e8b56e commit a4e5629

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/scheduler/scheduler_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,10 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) {
543543
st.RegisterBindPlugin(defaultbinder.Name, defaultbinder.New),
544544
st.RegisterPluginAsExtensions(nodeports.Name, nodeports.New, "Filter", "PreFilter"),
545545
}
546-
scheduler, bindingChan, _ := setupTestSchedulerWithOnePodOnNode(t, queuedPodStore, scache, informerFactory, stop, pod, &node, fns...)
546+
scheduler, bindingChan, errChan := setupTestSchedulerWithOnePodOnNode(t, queuedPodStore, scache, informerFactory, stop, pod, &node, fns...)
547547

548548
waitPodExpireChan := make(chan struct{})
549549
timeout := make(chan struct{})
550-
errChan := make(chan error)
551550
go func() {
552551
for {
553552
select {

0 commit comments

Comments
 (0)