Skip to content

Commit 9fd54c3

Browse files
authored
test: fix channel leak in event broadcaster
1 parent 899d0e1 commit 9fd54c3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/integration/utils.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ func initTestSchedulerWithOptions(t *testing.T, testCtx *testContext, opts ...sc
197197
t.Fatalf("Couldn't create scheduler: %v", err)
198198
}
199199

200-
stopCh := make(chan struct{})
201-
eventBroadcaster.StartRecordingToSink(stopCh)
200+
eventBroadcaster.StartRecordingToSink(testCtx.Ctx.Done())
202201

203202
return testCtx
204203
}

0 commit comments

Comments
 (0)