mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 16:01:24 +00:00
perf(test): remove slow port inspection and reconnect sleeps
This commit is contained in:
@@ -24,7 +24,10 @@ describe("ports helpers", () => {
|
||||
log: vi.fn(),
|
||||
exit: vi.fn() as unknown as (code: number) => never,
|
||||
};
|
||||
await handlePortError({ code: "EADDRINUSE" }, 1234, "context", runtime).catch(() => {});
|
||||
// Avoid slow OS port inspection; this test only cares about messaging + exit behavior.
|
||||
await handlePortError(new PortInUseError(1234, "details"), 1234, "context", runtime).catch(
|
||||
() => {},
|
||||
);
|
||||
expect(runtime.error).toHaveBeenCalled();
|
||||
expect(runtime.exit).toHaveBeenCalledWith(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user