Skip to content

Commit

Permalink
Wait until process exit with failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed May 4, 2017
1 parent f1d42bb commit 1c7ac3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/kompos/tests/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class TestConnection extends VmConnection {
this.somProc.on("exit", (code, signal) => {
if (code !== 0) {
this.somProc.stderr.on("close", () => {
reject(new Error("Process exited with code: " + code + " Signal: " + signal + " StdErr: " + errOut));
this.somProc.on("exit", (_code, _signal) => {
reject(new Error("Process exited with code: " + code + " Signal: " + signal + " StdErr: " + errOut));
});
});
}
});
Expand All @@ -109,7 +111,9 @@ export class TestConnection extends VmConnection {
}
if (dataStr.includes("Failed starting WebSocket and/or HTTP Server")) {
this.somProc.stderr.on("close", () => {
reject(new Error("SOMns failed to starting WebSocket and/or HTTP Server. StdOut: " + dataStr + " StdErr: " + errOut));
this.somProc.on("exit", (_code, _signal) => {
reject(new Error("SOMns failed to starting WebSocket and/or HTTP Server. StdOut: " + dataStr + " StdErr: " + errOut));
});
});
console.error("kill somProc because of failed connection");
this.somProc.kill();
Expand Down

0 comments on commit 1c7ac3d

Please sign in to comment.