@@ -202,9 +202,12 @@ func EVMReadFailsTest(t *testing.T, testEnv *ttypes.TestEnvironment, evmNegative
202202 // can't use t.Context() here because it will have been cancelled before the cleanup function is called
203203 ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
204204 defer cancel ()
205- server .Shutdown (ctx )
206- close (userLogsCh )
207- close (baseMessageCh )
205+ t_helpers .ShutdownChipSinkWithDrain (
206+ ctx ,
207+ server ,
208+ userLogsCh ,
209+ baseMessageCh ,
210+ )
208211 })
209212
210213 for _ , bcOutput := range testEnv .CreEnvironment .Blockchains {
@@ -272,9 +275,12 @@ func EVMLogTriggerFailsTest(t *testing.T, testEnv *ttypes.TestEnvironment, evmNe
272275 // can't use t.Context() here because it will have been cancelled before the cleanup function is called
273276 ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
274277 defer cancel ()
275- server .Shutdown (ctx )
276- close (userLogsCh )
277- close (baseMessageCh )
278+ t_helpers .ShutdownChipSinkWithDrain (
279+ ctx ,
280+ server ,
281+ userLogsCh ,
282+ baseMessageCh ,
283+ )
278284 })
279285 // drain user logs channel in the background, we are not asserting anything on it
280286 t_helpers .IgnoreUserLogs (t .Context (), userLogsCh )
@@ -374,9 +380,12 @@ func EVMWriteFailsTest(t *testing.T, testEnv *ttypes.TestEnvironment, evmNegativ
374380 // can't use t.Context() here because it will have been cancelled before the cleanup function is called
375381 ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
376382 defer cancel ()
377- server .Shutdown (ctx )
378- close (userLogsCh )
379- close (baseMessageCh )
383+ t_helpers .ShutdownChipSinkWithDrain (
384+ ctx ,
385+ server ,
386+ userLogsCh ,
387+ baseMessageCh ,
388+ )
380389 })
381390
382391 for _ , bcOutput := range testEnv .CreEnvironment .Blockchains {
0 commit comments