mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-19 23:58:11 +00:00
Increase timeout for nim-waku starts
Took 5 seconds in CI run.
This commit is contained in:
parent
ad9d629daa
commit
c14951cb0e
@ -13,9 +13,10 @@ import { waitForFile } from './async_fs';
|
|||||||
|
|
||||||
export default async function waitForLine(
|
export default async function waitForLine(
|
||||||
filepath: string,
|
filepath: string,
|
||||||
logLine: string
|
logLine: string,
|
||||||
|
timeout: number
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
await pTimeout(waitForFile(filepath), 2000);
|
await pTimeout(waitForFile(filepath), timeout);
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
fromBeginning: true,
|
fromBeginning: true,
|
||||||
|
@ -135,7 +135,7 @@ export class NimWaku {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dbg("Waiting to see 'RPC Server started' in nim-waku logs");
|
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');
|
dbg('nim-waku node has been started');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +149,8 @@ export class NimWaku {
|
|||||||
this.process = undefined;
|
this.process = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
async waitForLog(msg: string): Promise<void> {
|
async waitForLog(msg: string, timeout: number): Promise<void> {
|
||||||
return waitForLine(this.logPath, msg);
|
return waitForLine(this.logPath, msg, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calls nim-waku2 JSON-RPC API `get_waku_v2_admin_v1_peers` to check
|
/** Calls nim-waku2 JSON-RPC API `get_waku_v2_admin_v1_peers` to check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user