Skip to content

Commit 283375c

Browse files
authored
Retry E2E tests on failure if running in CI. (#995)
* Retry E2E tests in CI * newsfile
1 parent d550077 commit 283375c

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

changelog.d/995.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Retry e2e tests in CI due to container creation flakiness.

jest.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const config: Config = {
99
// The root directory that Jest should scan for tests and modules within
1010
rootDir: "spec-lib",
1111
testTimeout: 60000,
12+
setupFiles: ["<rootDir>/spec/setup-jest.js"],
1213
};
1314

1415
export default config;

spec/setup-jest.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// In CI, the network creation for the homerunner containers can race (https://github.com/matrix-org/complement/issues/720).
2+
jest.retryTimes(process.env.CI ? 3 : 1);

0 commit comments

Comments
 (0)