Skip to content

Commit

Permalink
chore: emui enable cypress retries (#2081)
Browse files Browse the repository at this point in the history
## Description:
@leoporoli has identified a case of the cypress tests again failing due
to a flakey test, subsequent to the attempt to fix in #2068.

Related failed runs are:
*
https://app.circleci.com/pipelines/github/kurtosis-tech/kurtosis/10835/workflows/4982925a-fb9d-4153-97d1-d5ec7288bb36/jobs/155379
*
https://app.circleci.com/pipelines/github/kurtosis-tech/kurtosis/10835/workflows/d6944842-bde1-45dc-b438-472cf735e13d/jobs/155457

These jobs have both failed in the `Can create and update an enclave`
test, which is the most important ete one for the emui. On subsquent
retries @leoporoli was able to have the test succeed.

It's not clear to me what is causing this flakiness, so this pr makes
two changes:
* Increase some hardcoded timeouts which post #2068 are actually less
generous than the default (I think this may have been the issue on the
second failure)
* Allow up to 3 attempts on a test when running in CI.

## Is this change user facing?
NO

## References (if applicable):
*
https://sageroomworkspace.slack.com/archives/C05DZ4UABDZ/p1706185246883059
  • Loading branch information
Dartoxian authored Feb 9, 2024
1 parent a6ad671 commit fb743e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions enclave-manager/web/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
defaultCommandTimeout: 20000,
retries: {
runMode: 2,
openMode: 0,
},
setupNodeEvents(on, config) {
// implement node event listeners here
},
Expand Down
6 changes: 3 additions & 3 deletions enclave-manager/web/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Cypress.Commands.add("createAndGoToEnclave", (enclaveName: string) => {

cy.contains("button", "Run").click();

cy.url({ timeout: 10 * 1000 }).should("match", /enclave\/[^/]+\/logs/);
cy.url({ timeout: 30 * 1000 }).should("match", /enclave\/[^/]+\/logs/);

cy.contains("button", "Edit").should("be.disabled");
cy.contains("Validating", { timeout: 10 * 1000 });
cy.contains("Script completed", { timeout: 10 * 1000 });
cy.contains("Validating", { timeout: 30 * 1000 });
cy.contains("Script completed", { timeout: 30 * 1000 });
cy.contains("button", "Edit").should("be.enabled");

// Go to the enclave overview
Expand Down

0 comments on commit fb743e0

Please sign in to comment.