From bf29d4e7c30ba9c248d62a452dc10516a911f7ce Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Thu, 16 Jan 2025 12:19:01 -0500 Subject: [PATCH 1/2] Increase Linode clone timeout to 5 minutes --- .../cypress/e2e/core/linodes/clone-linode.spec.ts | 13 ++++++++----- .../cypress/e2e/core/linodes/linode-config.spec.ts | 4 +++- .../manager/cypress/support/constants/linodes.ts | 7 +++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts index 55a1ce53a76..0f698c50e20 100644 --- a/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts @@ -18,6 +18,10 @@ import { randomLabel } from 'support/util/random'; import { authenticate } from 'support/api/authentication'; import { cleanUp } from 'support/util/cleanup'; import { createTestLinode } from 'support/util/linodes'; +import { + LINODE_CLONE_TIMEOUT, + LINODE_CREATE_TIMEOUT, +} from 'support/constants/linodes'; import type { Linode } from '@linode/api-v4'; /** @@ -33,9 +37,6 @@ const getLinodeCloneUrl = (linode: Linode): string => { return `/linodes/create?linodeID=${linode.id}${regionQuery}&type=Clone+Linode${typeQuery}`; }; -/* Timeout after 4 minutes while waiting for clone. */ -const CLONE_TIMEOUT = 240_000; - authenticate(); describe('clone linode', () => { before(() => { @@ -69,7 +70,9 @@ describe('clone linode', () => { cy.visitWithLogin(`/linodes/${linode.id}`); // Wait for Linode to boot, then initiate clone flow. - cy.findByText('OFFLINE').should('be.visible'); + cy.findByText('OFFLINE', { timeout: LINODE_CREATE_TIMEOUT }).should( + 'be.visible' + ); ui.actionMenu .findByTitle(`Action menu for Linode ${linode.label}`) @@ -108,7 +111,7 @@ describe('clone linode', () => { ui.toast.assertMessage(`Your Linode ${newLinodeLabel} is being created.`); ui.toast.assertMessage( `Linode ${linode.label} has been cloned to ${newLinodeLabel}.`, - { timeout: CLONE_TIMEOUT } + { timeout: LINODE_CLONE_TIMEOUT } ); }); }); diff --git a/packages/manager/cypress/e2e/core/linodes/linode-config.spec.ts b/packages/manager/cypress/e2e/core/linodes/linode-config.spec.ts index 68ec28b9701..903c5932224 100644 --- a/packages/manager/cypress/e2e/core/linodes/linode-config.spec.ts +++ b/packages/manager/cypress/e2e/core/linodes/linode-config.spec.ts @@ -4,6 +4,7 @@ import { authenticate } from 'support/api/authentication'; import { cleanUp } from 'support/util/cleanup'; import { mockGetVPC, mockGetVPCs } from 'support/intercepts/vpc'; import { dcPricingMockLinodeTypes } from 'support/constants/dc-specific-pricing'; +import { LINODE_CLONE_TIMEOUT } from 'support/constants/linodes'; import { chooseRegion, getRegionById } from 'support/util/regions'; import { mockGetVLANs } from 'support/intercepts/vlans'; import { @@ -225,7 +226,8 @@ describe('Linode Config management', () => { .its('response.statusCode') .should('eq', 200); ui.toast.assertMessage( - `Configuration ${config.label} successfully updated` + `Configuration ${config.label} successfully updated`, + { timeout: LINODE_CLONE_TIMEOUT } ); // Confirm that updated IPAM is automatically listed in config table. diff --git a/packages/manager/cypress/support/constants/linodes.ts b/packages/manager/cypress/support/constants/linodes.ts index 35d6762f810..c09601fe5de 100644 --- a/packages/manager/cypress/support/constants/linodes.ts +++ b/packages/manager/cypress/support/constants/linodes.ts @@ -8,3 +8,10 @@ * Equals 5 minutes. */ export const LINODE_CREATE_TIMEOUT = 300_000; + +/** + * Length of time to wait for a Linode to be cloned. + * + * Equals 5 minutes. + */ +export const LINODE_CLONE_TIMEOUT = 300_000; From e75500c26daab32a21bdad753d57bce9626bbe00 Mon Sep 17 00:00:00 2001 From: Joe D'Amore Date: Thu, 16 Jan 2025 12:38:09 -0500 Subject: [PATCH 2/2] Added changeset: Increase timeouts when performing Linode clone operations --- packages/manager/.changeset/pr-11529-tests-1737049089021.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-11529-tests-1737049089021.md diff --git a/packages/manager/.changeset/pr-11529-tests-1737049089021.md b/packages/manager/.changeset/pr-11529-tests-1737049089021.md new file mode 100644 index 00000000000..ccc8d489fc5 --- /dev/null +++ b/packages/manager/.changeset/pr-11529-tests-1737049089021.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tests +--- + +Increase timeouts when performing Linode clone operations ([#11529](https://github.com/linode/manager/pull/11529))