diff --git a/vms/rpcchainvm/vm_test.go b/vms/rpcchainvm/vm_test.go index fd23ee4edc37..23ec30aa9349 100644 --- a/vms/rpcchainvm/vm_test.go +++ b/vms/rpcchainvm/vm_test.go @@ -186,8 +186,7 @@ func TestRuntimeSubprocessBootstrap(t *testing.T) { require.NoError(os.Setenv(runtime.EngineAddressKey, listener.Addr().String())) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := t.Context() if test.serveVM { go func() {