chore: wait for apiReady before e2e assertions (#30928)
This commit is contained in:
parent
4e40218a65
commit
e1ef45f5e0
1 changed files with 4 additions and 1 deletions
|
|
@ -130,7 +130,10 @@ async function _start(config?: string, flags: string | string[] = []) {
|
|||
steamLog.end();
|
||||
});
|
||||
try {
|
||||
await waitOn({ resources: [baseUrl()], log: LOG_ENABLED, timeout: 90000 });
|
||||
// wait for apiReady so tests don't race a half-started backend
|
||||
const jq = encodeURIComponent(".apiReady|select(.)");
|
||||
const ready = `${baseUrl().replace(/^http/, "http-get")}/api/state?jq=${jq}`;
|
||||
await waitOn({ resources: [ready], log: LOG_ENABLED, timeout: 90000 });
|
||||
} catch (error) {
|
||||
instance.kill("SIGKILL");
|
||||
console.error(logPrefix(), `evcc startup failed: ${error}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue