Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] [TEST] cluster tool needed changes due to changes on deno for handling signals #285

Merged
merged 1 commit into from
Apr 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/helpers/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ try {
const pid = `[${s.process.pid}]`;
const cpid = rgb24(pid, s.rgb);
console.log(
`${cpid} ${s.configFile} at nats://${s.hostname}:${s.port} cluster://${s.hostname}:${s.cluster} http://127.0.0.1:${s.monitoring} - store: ${s.config.jetstream.store_dir}`,
`${cpid} ${s.configFile} at nats://${s.hostname}:${s.port} cluster://${s.hostname}:${s.cluster} http://127.0.0.1:${s.monitoring} - store: ${s
.config?.jetstream?.store_dir}`,
kozlovic marked this conversation as resolved.
Show resolved Hide resolved
);
});

Expand All @@ -71,8 +72,7 @@ try {

async function waitForStop(): Promise<void> {
console.log("control+c to terminate");
const sig = Deno.signal(Deno.Signal.SIGTERM);
for await (const _ of sig) {
sig.dispose();
}
Deno.addSignalListener("SIGTERM", () => {
Deno.exit();
});
}