File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -339,12 +339,12 @@ func TestCommandPlugin_FeatureDisabled(t *testing.T) {
339339
340340func TestMonitorSubscribeChannel (t * testing.T ) {
341341 ctx , cncl := context .WithCancel (context .Background ())
342- defer cncl ()
343342
344343 logBuf := & bytes.Buffer {}
345344 stub .StubLoggerWith (logBuf )
346345
347346 cp := NewCommandPlugin (types .AgentConfig (), & grpcfakes.FakeGrpcConnectionInterface {})
347+ cp .subscribeCancel = cncl
348348
349349 message := protos .CreateManagementPlaneRequest ()
350350
@@ -359,7 +359,7 @@ func TestMonitorSubscribeChannel(t *testing.T) {
359359 // Give some time to process the message
360360 time .Sleep (100 * time .Millisecond )
361361
362- cncl ( )
362+ cp . Close ( ctx )
363363
364364 time .Sleep (100 * time .Millisecond )
365365
You can’t perform that action at this time.
0 commit comments