tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
2.95k stars 245 forks source link

Add request timeout to license URL check #1700

Closed jdeanwallace closed 7 months ago

jdeanwallace commented 7 months ago

Resolves https://github.com/tiny-pilot/tinypilot/issues/1689

By default, Playwright limits each test to a 30s runtime. Unfortunately, when the the test reaches its timeout, it displays an opaque error message:

Screen Shot 2023-12-05 at 14 42 47

In this case, the test timed out because one of the license URLs took >30s to respond.

To avoid this issue, I've applied a 10s timeout to each license URL check.

Notes

  1. I couldn't find a way to catch the actual test's TimeoutError or how to set a custom test timeout message 🤷‍♂️
  2. I tested this PR via

Review on CodeApprove

jdeanwallace commented 7 months ago
Automated comment from CodeApprove ➜

⏳ @jotaen4tinypilot please review this Pull Request