Skip to content

Reset player before each test#440

Open
wvanhaevre wants to merge 7 commits into
mainfrom
test/cavy_test
Open

Reset player before each test#440
wvanhaevre wants to merge 7 commits into
mainfrom
test/cavy_test

Conversation

@wvanhaevre

@wvanhaevre wvanhaevre commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Open in Devin Review

assumption:

  1. reRender() — schedules setState, React hasn't flushed yet
  2. getTestPlayer() — waits 200ms, checks testPlayer → it's still the old player from the previous test → resolves immediately
  3. Test proceeds — creates connector on old player, registers event listeners for SOURCE_CHANGE/PLAY/PLAYING, sets player.source
  4. React finally reconciles — unmounts old TestableTHEOplayerView → native player is destroyed underneath
  5. Events never fire on the now-dead player → 30s timeout → test fails

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cbee06

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

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

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