MCPcopy Index your code
hub / github.com/coder/coder / stopAgent

Function stopAgent

site/e2e/helpers.ts:544–552  ·  view source on GitHub ↗
(cp: ChildProcess)

Source from the content-addressed store, hash-verified

542};
543
544export const stopAgent = async (cp: ChildProcess) => {
545 // The command `kill` is used to terminate an agent started as a standalone binary.
546 exec(`kill ${cp.pid}`, (error) => {
547 if (error) {
548 throw new Error(`exec error: ${JSON.stringify(error)}`);
549 }
550 });
551 await waitUntilUrlIsNotResponding(`http://localhost:${prometheusPort}`);
552};
553
554export const waitUntilUrlIsNotResponding = async (url: string) => {
555 const maxRetries = 30;

Callers 4

app.spec.tsFile · 0.90

Calls 2

execFunction · 0.85

Tested by

no test coverage detected