diff --git a/src/test_utils/nim_waku.ts b/src/test_utils/nim_waku.ts index 01d2f74287..484e93ce04 100644 --- a/src/test_utils/nim_waku.ts +++ b/src/test_utils/nim_waku.ts @@ -33,6 +33,7 @@ export interface Args { export class NimWaku { private process?: ChildProcess; + private pid?: number; private portsShift: number; private peerId?: PeerId; private logPath: string; @@ -70,21 +71,38 @@ export class NimWaku { logFile, // stderr ], }); + this.pid = this.process.pid; + console.log( + `nim-waku ${ + this.process.pid + } started at ${new Date().toLocaleTimeString()}` + ); this.process.on('exit', (signal) => { - if (signal != 0) { - console.log(`nim-waku process exited with ${signal}`); - } + console.log( + `nim-waku ${ + this.process ? this.process.pid : this.pid + } process exited with ${signal} at ${new Date().toLocaleTimeString()}` + ); }); this.process.on('error', (err) => { - console.log(`nim-waku process encountered an error: ${err}`); + console.log( + `nim-waku ${ + this.process ? this.process.pid : this.pid + } process encountered an error: ${err} at ${new Date().toLocaleTimeString()}` + ); }); await this.waitForLog('RPC Server started'); } public stop() { + console.log( + `nim-waku ${ + this.process ? this.process.pid : this.pid + } getting SIGINT at ${new Date().toLocaleTimeString()}` + ); this.process ? this.process.kill('SIGINT') : null; this.process = undefined; }