Wait for code to finish w/ crappy set timeout 4
This commit is contained in:
parent
29ec7d1469
commit
307879b026
|
@ -12,7 +12,7 @@ import * as util from "./util.js";
|
|||
import { bash, getUUID, logError } from "./util.js";
|
||||
|
||||
const allSessions = new Set();
|
||||
export const TEST_RUN_FINISHED = "Test run!\n";
|
||||
export const TEST_RUN_FINISHED = "Test run finished!\n";
|
||||
export class Session {
|
||||
get homedir() {
|
||||
return "/home/riju/src";
|
||||
|
@ -235,10 +235,10 @@ export class Session {
|
|||
break;
|
||||
}
|
||||
await this.runCode(msg.code, msg.expectedOutput);
|
||||
if (!this.config.repl) {
|
||||
if (this.config.repl) {
|
||||
setTimeout(() => {
|
||||
this.term.pty.stdin.write(TEST_RUN_FINISHED);
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
break;
|
||||
case "formatCode":
|
||||
|
|
|
@ -152,7 +152,7 @@ async function main() {
|
|||
term.write(message.output);
|
||||
testData.push(message.output);
|
||||
|
||||
if (testData.join("").includes('Test run')) {
|
||||
if (testData.join("").includes('Test run finished')) {
|
||||
postTestResults(testData, message.expectedOutput);
|
||||
testData = [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue