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

chore: make some test retries possible to succeed #8571

Closed
wants to merge 1 commit into from

Conversation

dummdidumm
Copy link
Member

We do not have a reset function on those, and they sometimes fail for mysterious reason even if the count is updated, but playwright somehow doesn't notice. This makes it possible for retries to succeed in that case.

Alternative would be to have a reset function on all of them, but I'm not sure if this then has the "fetch goes into the abyss" problem.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

We do not have a reset function on those, and they sometimes fail for mysterious reason even if the count _is_ updated, but playwright somehow doesn't notice. This makes it possible for retries to succeed in that case.
@changeset-bot
Copy link

changeset-bot bot commented Jan 17, 2023

⚠️ No Changeset found

Latest commit: 708130f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@benmccann
Copy link
Member

I'm not sure this works exactly right. It assumes the counter is incremented exactly once for each retry, but depending on where the test fails it could be incremented zero to two times. Maybe you need to check the initial counter value at the beginning of the test

But I'm also not sure we need to do this at all. These tests are being affected by the same thing as the form action tests, so we should probably fix them in the same way (e.g. #8570)

@dummdidumm
Copy link
Member Author

How would a fix look like besides "not run it"? I'm out of ideas at this point. @Rich-Harris brought up the good idea of grouping all flaky tests in a single describe("flaky tests", ..) which we give way more retries than now, and set the retry in general to 0. If we go that route, we need tests to be retriable. So yeah parse the number from the text or add a reset function.

@benmccann
Copy link
Member

I think the issue is probably somewhere on Playwright or WebKit side. I filed one issue with PlayWright before and they didn't look at it because the reproduction was too complicated. Assuming I can't more easily reproduce something that they can look at, I think that not running the tests in WebKit may be more preferable to running on a flaky unreliable platform that doesn't add much in terms of confidence. There's a few PRs dealing with this, so I opened an issue so that we can have a single place to discuss: #8578 (or now we have four places instead of three 😆)

@benmccann
Copy link
Member

This hopefully shouldn't need retries now that #8585 was merged. That being said, I'll leave this open since it is still an issue that if it did do a retry for some reason it might not work as you've pointed out. I'll leave it to you to decide if it's worth tweaking this to add a reset function or something or if it's not worth pursuing anymore

@Rich-Harris
Copy link
Member

i haven't seen any flakiness since the recent change around cross-browser tests, so i'm gonna be optimistic and close this

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