-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Resolve Linode/Firewall E2E flake by using alternative security method #10581
test: Resolve Linode/Firewall E2E flake by using alternative security method #10581
Conversation
Coverage Report: ✅ |
@@ -33,6 +33,9 @@ const getLinodeCloneUrl = (linode: Linode): string => { | |||
return `/linodes/create?linodeID=${linode.id}${regionQuery}&type=Clone+Linode${typeQuery}`; | |||
}; | |||
|
|||
/* Timeout after 3 seconds while waiting for clone. */ | |||
const CLONE_TIMEOUT = 180_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a timeout nulls the assertion or does the the test fails after an extra 3s if unfillfilled?
Am asking cause it feels a bit like an unreliable bandage and wondering if there's a better way to do this. If I am not wrong we're waiting for an async action, an API event triggering a snackbar notification? Wondering if it could help to intercept events and wait for a particular action payload (thinking out loud!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry -- that comment should say 3 minutes 😅
The test will fail if the clone toast doesn't appear within 3 minutes. Every Cypress command has a timeout where the test will fail if the assertion isn't met, and in this case I had to increase the default timeout of cy.contains()
because the clone operation now takes longer now that the Linode we're cloning has an image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh ok that makes more sense, also i should've done the math 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test passed
… method (linode#10581) * Work around Linode/Firewall flake by using alternative security method * Added changeset: Fix Linode/Firewall related E2E test flake
Description 📝
Since merging #10538, a few of our tests have become especially flaky. This appears to be caused by an API issue where the API responds with
400
Linode busy
when performing some actions on Linodes that are attached to Firewalls. This happens most often when attempting to interact with a Linode that has just finished booting.See also #10580, which makes this issue more reproducible for troubleshooting/exploration purposes.
Changes 🔄
How to test 🧪
We can rely on CI for this. Ideally all of the identified tests will pass without any flake.
To run the tests locally, use this command:
yarn cy:run -s "cypress/e2e/core/linodes/rescue-linode.spec.ts,cypress/e2e/core/linodes/resize-linode.spec.ts,cypress/e2e/core/linodes/linode-config.spec.ts,cypress/e2e/core/linodes/switch-linode-state.spec.ts,cypress/e2e/core/linodes/clone-linode.spec.ts"
As an Author I have considered 🤔
Check all that apply