-
Notifications
You must be signed in to change notification settings - Fork 101
Allow tests to extend endTestScope timeout #4560
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
Open
haoxli
wants to merge
1
commit into
gpuweb:main
Choose a base branch
from
haoxli:fix-timestamp-query-timeout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I want to make this part of the "official" interface of the test fixture. It seems a bit fragile or easy to misuse because it's very specific to the test why this might need to be done.
Would it work to wait inside the test by just doing
await t.queue.onSubmittedWorkDone()at the end before returning from the test function?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I try it not work for this timeout case. This failure was not because the test ended before the commands were completed, but rather because it didn't have enough time to finish the tests (includes waiting submitted commands done + error scop popping + celanup). I think what we need here is a mechanism to increase the execution time of cases that require long execution times.
To avoid exposing it as a public interface and thus causing misuse, how about make the framework to auto-detect slow tests and extend timeouts automatically, if the default timeout in endTestScope is hit, run the case again with twice the default timeout. However, this approach increases the overall runtime of the test suite if a network-related timeout occurs.
Another idea is whether we can move this case into the stress test
src/stress/queries/timestamps.spec.ts. I see there are some stress tests for render/compute pass are unimplemented, It would be reasonable to set a separate timeout for them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... it occurs to me that the test fixture already does
onSubmittedWorkDoneat the end of tests, so I should have realized that wouldn't work.I was thinking that if the
popErrorScopetimeout worked,onSubmittedWorkDonewould also work. But maybe not anymore because of work in Dawn to make error scopes asynchronous?Anyway, what about just wrapping the test body in
t.device.pushErrorScope('validation')/await t.device.popErrorScope()? If error scopes are able to capture the slowness at the test-fixture level, they should work at the test level too.IMO that would add too much complexity to the CTS and would probably interact poorly with the browsers' test harnesses which have their own timeout systems. My objection to putting it in the public interface is not that strong :)
I thought about suggesting moving this to
stress, but right now I don't think anyone is running those tests so I don't want to lose the coverage. If we can make it run reliably then I'd like to keep it in the conformance section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OOO this week and will update it next week.