Skip to content

Commit

Permalink
Retry E2E tests on failure if running in CI. (#995)
Browse files Browse the repository at this point in the history
* Retry E2E tests in CI

* newsfile
  • Loading branch information
Half-Shot authored Nov 29, 2024
1 parent d550077 commit 283375c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/995.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retry e2e tests in CI due to container creation flakiness.
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config: Config = {
// The root directory that Jest should scan for tests and modules within
rootDir: "spec-lib",
testTimeout: 60000,
setupFiles: ["<rootDir>/spec/setup-jest.js"],
};

export default config;
2 changes: 2 additions & 0 deletions spec/setup-jest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// In CI, the network creation for the homerunner containers can race (https://github.com/matrix-org/complement/issues/720).
jest.retryTimes(process.env.CI ? 3 : 1);

0 comments on commit 283375c

Please sign in to comment.