diff --git a/packages/ckb-indexer/scripts/e2e-test.ts b/packages/ckb-indexer/scripts/e2e-test.ts index 3f43c1c5f..8a3011954 100644 --- a/packages/ckb-indexer/scripts/e2e-test.ts +++ b/packages/ckb-indexer/scripts/e2e-test.ts @@ -48,6 +48,7 @@ async function main() { ckbProcess.kill(); indexerProcess.kill(); + process.exit(); } main(); diff --git a/packages/testkit/src/ckb-indexer-helper.ts b/packages/testkit/src/ckb-indexer-helper.ts index 7de4bd61c..0b811c476 100644 --- a/packages/testkit/src/ckb-indexer-helper.ts +++ b/packages/testkit/src/ckb-indexer-helper.ts @@ -3,6 +3,7 @@ import compareVersions from "compare-versions"; import os from "os"; // TODO dep import downloadAndExtract from "download"; +import childProcess from "node:child_process"; function log(info: string): void { console.log(info); @@ -85,10 +86,7 @@ export async function startCKBIndexer(CKBVersion?: string): Promise { await downloadCKBIndexer(); console.log("start indexer at", new Date().toLocaleString()); - shell.exec( - `RUST_LOG=info ./ckb-indexer -c http://127.0.0.1:8118/rpc -l 127.0.0.1:8120 -s indexer-store-tmp`, - { - async: true, - } + childProcess.exec( + `RUST_LOG=info ./ckb-indexer -c http://127.0.0.1:8118/rpc -l 127.0.0.1:8120 -s indexer-store-tmp` ); }