From fb743e0a5a55aaab51f362633dbd5e7424fa631d Mon Sep 17 00:00:00 2001 From: Ben Gazzard Date: Fri, 9 Feb 2024 17:02:17 +0000 Subject: [PATCH] chore: emui enable cypress retries (#2081) ## 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 --- enclave-manager/web/cypress.config.ts | 4 ++++ enclave-manager/web/cypress/support/commands.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/enclave-manager/web/cypress.config.ts b/enclave-manager/web/cypress.config.ts index c0d7712df5..33076b7561 100644 --- a/enclave-manager/web/cypress.config.ts +++ b/enclave-manager/web/cypress.config.ts @@ -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 }, diff --git a/enclave-manager/web/cypress/support/commands.ts b/enclave-manager/web/cypress/support/commands.ts index aa5578694a..d5dada8bc8 100644 --- a/enclave-manager/web/cypress/support/commands.ts +++ b/enclave-manager/web/cypress/support/commands.ts @@ -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