From b8b43e4812d0c84d7d350ceecaae91d1b9e7439a Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 21 Aug 2024 17:18:01 +0200 Subject: [PATCH] try another way --- apps/remix-ide-e2e/src/tests/remixd.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 7f518abb54..51c4c61f24 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -6,6 +6,7 @@ import { ChildProcess, spawn } from 'child_process' import { homedir } from 'os' import kill from 'tree-kill' +import treeKill from 'tree-kill' let remixd: ChildProcess const assetsTestContract = `import "./contract.sol"; @@ -59,19 +60,15 @@ module.exports = { if (browser.currentTest.results.failed > 0) { console.log('Test failed, disconnecting services...'); console.log('remixd', remixd.pid); - - try { - await killProcess(remixd.pid); - console.log('Service disconnected successfully.'); - } catch (error) { - console.error('Failed to disconnect service:', error); - } } }, after: async function (browser) { try { - await killProcess(remixd.pid); + console.log('remixd pid', remixd.pid); + treeKill(remixd.pid, 'SIGKILL', (err) => { + console.log('remixd killed', err) + }) console.log('Service disconnected successfully.'); } catch (error) { console.error('Failed to disconnect service:', error);