Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
test: increase test timeout duration for slow test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Aug 8, 2023
1 parent 7065916 commit b56874e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions packages/core/tests/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,9 @@ describe("server", () => {
} finally {
await teardown();
}
});
// TODO: this test can take a while on mac in CI, figure out why
// https://github.com/trufflesuite/ganache/issues/4505
}).timeout(0);

it("fails to `.listen()` twice, Callback", async () => {
await setup();
Expand Down Expand Up @@ -514,9 +516,19 @@ describe("server", () => {

await s.close();

const error = await post("localhost", port, jsonRpcJson, agent).catch(e => e);
assert(error instanceof Error, `Expected error to be an instance of Error, but got ${error} instead`);
assert("code" in error && (error["code"] === "ECONNREFUSED" || error["code"] === "ECONNRESET"), `Expected error.code to be ECONNREFUSED or ECONNRESET, got ${error} instead`);
const error = await post("localhost", port, jsonRpcJson, agent).catch(
e => e
);
assert(
error instanceof Error,
`Expected error to be an instance of Error, but got ${error} instead`
);
assert(
"code" in error &&
(error["code"] === "ECONNREFUSED" ||
error["code"] === "ECONNRESET"),
`Expected error.code to be ECONNREFUSED or ECONNRESET, got ${error} instead`
);
} finally {
teardown();
}
Expand Down

0 comments on commit b56874e

Please sign in to comment.