Increase timeout for nim-waku starts

Took 5 seconds in CI run.
This commit is contained in:
Franck Royer 2021-08-09 11:58:58 +10:00
parent ad9d629daa
commit c14951cb0e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 6 additions and 5 deletions

View File

@ -13,9 +13,10 @@ import { waitForFile } from './async_fs';
export default async function waitForLine(
filepath: string,
logLine: string
logLine: string,
timeout: number
): Promise<void> {
await pTimeout(waitForFile(filepath), 2000);
await pTimeout(waitForFile(filepath), timeout);
const options = {
fromBeginning: true,

View File

@ -135,7 +135,7 @@ export class NimWaku {
});
dbg("Waiting to see 'RPC Server started' in nim-waku logs");
await this.waitForLog('RPC Server started');
await this.waitForLog('RPC Server started', 10000);
dbg('nim-waku node has been started');
}
@ -149,8 +149,8 @@ export class NimWaku {
this.process = undefined;
}
async waitForLog(msg: string): Promise<void> {
return waitForLine(this.logPath, msg);
async waitForLog(msg: string, timeout: number): Promise<void> {
return waitForLine(this.logPath, msg, timeout);
}
/** Calls nim-waku2 JSON-RPC API `get_waku_v2_admin_v1_peers` to check