Skip to content
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

Reduce flakiness in explorer/apps/repositories.spec.ts #12445

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mantis-toboggan-md
Copy link
Member

Summary

Partially addresses #12099

This PR corrects some retry logic in one of the e2e tests I'm seeing fail often.

You an see an example of this failure on our sorry cypress instance .../instance/7a973f49-6fff-40d3-8054-9c5aa95a653b/test/r7

Each time this test runs it adds a repo name to reposToDelete. After each attempt, the afterEach hook tries to delete all repos in reposToDelete. If the test fails and retries, the afterEach hook will be retrying a repo deletion, get a 404 not found, and error out.

The simplest fix here seems to be to ignore these errors in afterEach. We could also refactor the test so it only attempts to delete one repo each run.

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@@ -48,7 +48,7 @@ describe('Apps', () => {

// Ensure this runs after an attempt, rather than all attemps (`after` only runs once after all cypress retries)
afterEach(() => {
reposToDelete.forEach((r) => cy.deleteRancherResource('v1', 'catalog.cattle.io.clusterrepos', r));
reposToDelete.forEach((r) => cy.deleteRancherResource('v1', 'catalog.cattle.io.clusterrepos', r, false));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could convert this to a for loop and remove the entry on successful deletion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants