WordPress / WordPress/openverse
Lower playwright default timeout
@zackkrida is already working on this.
Since Sep 5, 2024.
- Dominant language
- Python
- Stars
- 380
- Forks
- 290
- Avg merge
- 3h 17m
- Merged PRs (30d)
- 8
Description
Problem
Our current default playwright timeout is very high (1 minute) and makes debugging new tests annoying. It's also potentially too flexible if we want to rely on playwright tests to give us some indication of the general performance of the application.
Description
Our current end to end tests should be very fast under most conditions. Specifically, unless a new page is being accessed (in which case a real API request will have to be made) the every request and navigation never leaves the local loopback. With our current high timeout of 1 minute, we're probably losing some insight into when parts of the application slow down, but we're also making debugging new tests annoying. If a selector you write doesn't work, then you have to wait a full minute for it to fail unless you remembered specifically to pass a shorter timeout to the selector function.
Curious what @WordPress/openverse-frontend folks think about this and what the lowered timeout should be if we did do it. Most of the time I find that 100 works fine, but it might be too low for certain things like page navigation. In those cases, should we expect the test writer to manually raise the timeout only for those cases when it is necessary? Or should we choose a middle ground like 1 or 2 seconds? Those still seem very high if we expect our app to be performant (especially considering we're taking network latency out of the equation except when running update-tapes).
If we do lower it, we'd also want to default to a higher value when updating tapes, so that we do account for the network latency.
Implementation
- 🙋 I would be interested in implementing this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.