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