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

test: Deflake demo tests #5467

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

joeyparrish
Copy link
Member

The demo tests occasionally timeout, in spite of being synchronous test cases. This is because of an async teardown process between tests, which can sometimes hang.

This may indicate some condition in which player.destroy() could hang, though I have been unable to replicate that hypothetical condition in an explicit unit test.

The hang goes away if we don't attach to the video element. Since the tests don't use the video element directly or attempt to load any content, we can just skip the video element attachment.

Another thing that appears to resolve the hang is to await attach(), so a comment has been left to warn anyone modifying the code in the future not to use the constructor argument to attach a video element.

The demo tests occasionally timeout, in spite of being synchronous
test cases.  This is because of an async teardown process between
tests, which can sometimes hang.

This may indicate some condition in which player.destroy() could hang,
though I have been unable to replicate that hypothetical condition in
an explicit unit test.

The hang goes away if we don't attach to the video element.  Since the
tests don't use the video element directly or attempt to load any
content, we can just skip the video element attachment.

Another thing that appears to resolve the hang is to await attach(),
so a comment has been left to warn anyone modifying the code in the
future not to use the constructor argument to attach a video element.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Incremental code coverage: No instrumented code was changed.

@joeyparrish joeyparrish merged commit b4dbb28 into shaka-project:main Aug 8, 2023
@joeyparrish joeyparrish deleted the deflake-demo-tests branch August 8, 2023 15:30
joeyparrish added a commit that referenced this pull request Aug 19, 2023
The demo tests occasionally timeout, in spite of being synchronous test
cases. This is because of an async teardown process between tests, which
can sometimes hang.

This may indicate some condition in which player.destroy() could hang,
though I have been unable to replicate that hypothetical condition in an
explicit unit test.

The hang goes away if we don't attach to the video element. Since the
tests don't use the video element directly or attempt to load any
content, we can just skip the video element attachment.

Another thing that appears to resolve the hang is to await attach(), so
a comment has been left to warn anyone modifying the code in the future
not to use the constructor argument to attach a video element.
joeyparrish added a commit that referenced this pull request Aug 20, 2023
The demo tests occasionally timeout, in spite of being synchronous test
cases. This is because of an async teardown process between tests, which
can sometimes hang.

This may indicate some condition in which player.destroy() could hang,
though I have been unable to replicate that hypothetical condition in an
explicit unit test.

The hang goes away if we don't attach to the video element. Since the
tests don't use the video element directly or attempt to load any
content, we can just skip the video element attachment.

Another thing that appears to resolve the hang is to await attach(), so
a comment has been left to warn anyone modifying the code in the future
not to use the constructor argument to attach a video element.
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Oct 7, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants