Fix race condition, error reporting
This commit is contained in:
parent
0945ad6550
commit
80119ba66d
|
@ -72,7 +72,6 @@ export class Session {
|
||||||
this.lang = lang;
|
this.lang = lang;
|
||||||
this.logPrimitive = log;
|
this.logPrimitive = log;
|
||||||
this.log(`Creating session, language ${this.lang}`);
|
this.log(`Creating session, language ${this.lang}`);
|
||||||
this.setup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run = async (args: string[], options?: Options) => {
|
run = async (args: string[], options?: Options) => {
|
||||||
|
|
|
@ -78,7 +78,7 @@ function addWebsocket(
|
||||||
);
|
);
|
||||||
ws.close();
|
ws.close();
|
||||||
} else {
|
} else {
|
||||||
new api.Session(ws, lang, console.log);
|
new api.Session(ws, lang, console.log).setup();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return app;
|
return app;
|
||||||
|
|
|
@ -75,6 +75,7 @@ class Test {
|
||||||
this.timedOut = true;
|
this.timedOut = true;
|
||||||
this.handleUpdate();
|
this.handleUpdate();
|
||||||
}, TIMEOUT_MS);
|
}, TIMEOUT_MS);
|
||||||
|
await session.setup();
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case "ensure":
|
case "ensure":
|
||||||
await this.testEnsure();
|
await this.testEnsure();
|
||||||
|
@ -273,6 +274,7 @@ async function main() {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("failed:");
|
console.error("failed:");
|
||||||
console.error(test.getLog());
|
console.error(test.getLog());
|
||||||
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue