Skip to content

Fix two flaky tests (qBittorrent metadata timing, onboarding MAM row) - #87

Open
TheMightyTRex wants to merge 1 commit into
logabell:mainfrom
TheMightyTRex:contrib/flaky-tests
Open

TheMightyTRex wants to merge 1 commit into
logabell:mainfrom
TheMightyTRex:contrib/flaky-tests

Conversation

@TheMightyTRex

Copy link
Copy Markdown

Two tests fail at random on a busy machine. Neither change affects the app.

  • tests/unit/test_qbittorrent_metadata.py: every case had 0.2 seconds, including the cases that start the torrent probe subprocess, which can take longer than that under load. Only the pending case should time out, so the others now have 10 seconds. The assertions are unchanged.
  • apps/web/tests/getting-started.spec.ts: the onboarding journey opens the MAM row, checks whether the form is visible, and clicks again if not. When the first click had not rendered yet, the second click closed the row, and the next step timed out. It now waits for the form after each click, and retries until it is open.

Each passed repeatedly after the change: the unit test three times in a row, and the onboarding journey twice against a real server.

🤖 Generated with Claude Code

- The qBittorrent metadata test gave every case 0.2 seconds, including the cases that start the
  torrent probe subprocess, which can take longer on a busy machine. Only the pending case needs to
  time out, so the others now have 10 seconds.
- The onboarding journey clicked the MAM row a second time when the first click had not rendered
  yet, which closed it again. It now waits for the form after each click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant