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

Add timeouts to web platform tests #9460

Closed
caspervonb opened this issue Feb 9, 2021 · 2 comments
Closed

Add timeouts to web platform tests #9460

caspervonb opened this issue Feb 9, 2021 · 2 comments
Assignees
Labels
feat new feature (which has been agreed to/accepted) tests related to tests

Comments

@caspervonb
Copy link
Contributor

Tried running a wpt update and it eventually got stuck in fetch.

/fetch/api/abort/general.any.html

test Request objects have a signal property ... failed
test Signal state is cloned ... failed
test Clone aborts with original controller ... failed
test Aborting rejects with AbortError ... failed
test Aborting rejects with AbortError - no-cors ... failed
test TypeError from request constructor takes priority - RequestInit's window is not null ... ok
test TypeError from request constructor takes priority - Input URL is not valid ... failed
test TypeError from request constructor takes priority - Input URL has credentials ... ok
test TypeError from request constructor takes priority - RequestInit's mode is navigate ... ok
test TypeError from request constructor takes priority - RequestInit's referrer is invalid ... ok
test TypeError from request constructor takes priority - RequestInit's method is invalid ... ok
test TypeError from request constructor takes priority - RequestInit's method is forbidden ... ok
test TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple ... ok
test TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin ... ok
test TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors ... ok
test TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors ... ok
test TypeError from request constructor takes priority - Bad referrerPolicy init parameter value ... ok
test TypeError from request constructor takes priority - Bad mode init parameter value ... ok
test TypeError from request constructor takes priority - Bad credentials init parameter value ... ok
test TypeError from request constructor takes priority - Bad cache init parameter value ... ok
test TypeError from request constructor takes priority - Bad redirect init parameter value ... ok
test Signal on request object ... failed
test Signal on request object created from request object ... failed
test Signal on request object created from request object, with signal on second request ... failed
test Signal on request object created from request object, with signal on second request overriding another ... failed
test Signal retained after unrelated properties are overridden by fetch ... failed
test Signal removed by setting to null ... ok
test Already aborted signal rejects immediately ... failed
test Request is still 'used' if signal is aborted before fetching ... ok
test response.arrayBuffer() rejects if already aborted ... failed
test response.blob() rejects if already aborted ... failed
test response.formData() rejects if already aborted ... failed
test response.json() rejects if already aborted ... failed
test response.text() rejects if already aborted ... failed
test Already aborted signal does not make request ... failed
test Already aborted signal can be used for many fetches ... failed
test Signal can be used to abort other fetches, even if another fetch succeeded before aborting ... failed
test Underlying connection is closed when aborting after receiving response ... failed
test Underlying connection is closed when aborting after receiving response - no-cors ... failed

I gave up after around 20 minutes and killed the process.
Adding a reasonable default timeout to each test would be good (there's also the meta comment to consider, which should override it).

@lucacasonato lucacasonato self-assigned this Feb 9, 2021
@lucacasonato
Copy link
Member

On my backburner. Will address soon.

@lucacasonato lucacasonato added the tests related to tests label Feb 9, 2021
@kitsonk kitsonk added the feat new feature (which has been agreed to/accepted) label Feb 9, 2021
andreubotella pushed a commit to andreubotella/deno that referenced this issue Sep 25, 2021
Classic workers were implemented in denoland#11338, which also enabled the WPT
tests in the `workers` directory. However, the rest of WPT worker tests
were not enabled because a number of them were hanging due to
web-platform-tests/wpt#29777. Now that that WPT issue is fixed, the bulk
of worker tests can be enabled.

There are still a few tests that hang, and so haven't been enabled. In
particular:

- The following tests seem to hang because a promise fails to resolve.
  We can detect such cases in non-worker tests because the process will
  exit without calling the WPT completion callback, but in worker tests
  the worker message ops will keep the event loop running. This will be
  fixed when we add timeouts to WPT tests (denoland#9460).

  - `/fetch/api/basic/error-after-response.any.worker.html`
  - `/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker.html`
  - `/webmessaging/message-channels/worker-post-after-close.any.worker.html`
  - `/webmessaging/message-channels/worker.any.worker.html`
  - `/websockets/Create-on-worker-shutdown.any.worker.html`

- The following tests apparently hang because a promise rejection is
  never handled, which will kill the process in the main thread but not
  in workers (denoland#12221).

  - `/streams/readable-streams/async-iterator.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker.html`
andreubotella pushed a commit to andreubotella/deno that referenced this issue Oct 7, 2021
Classic workers were implemented in denoland#11338, which also enabled the WPT
tests in the `workers` directory. However, the rest of WPT worker tests
were not enabled because a number of them were hanging due to
web-platform-tests/wpt#29777. Now that that WPT issue is fixed, the bulk
of worker tests can be enabled.

There are still a few tests that hang, and so haven't been enabled. In
particular:

- The following tests seem to hang because a promise fails to resolve.
  We can detect such cases in non-worker tests because the process will
  exit without calling the WPT completion callback, but in worker tests
  the worker message ops will keep the event loop running. This will be
  fixed when we add timeouts to WPT tests (denoland#9460).

  - `/fetch/api/basic/error-after-response.any.worker.html`
  - `/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker.html`
  - `/webmessaging/message-channels/worker-post-after-close.any.worker.html`
  - `/webmessaging/message-channels/worker.any.worker.html`
  - `/websockets/Create-on-worker-shutdown.any.worker.html`

- The following tests apparently hang because a promise rejection is
  never handled, which will kill the process in the main thread but not
  in workers (denoland#12221).

  - `/streams/readable-streams/async-iterator.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker.html`
bartlomieju pushed a commit that referenced this issue Oct 8, 2021
Classic workers were implemented in #11338, which also enabled the WPT
tests in the `workers` directory. However, the rest of WPT worker tests
were not enabled because a number of them were hanging due to
web-platform-tests/wpt#29777. Now that that WPT issue is fixed, the bulk
of worker tests can be enabled.

There are still a few tests that hang, and so haven't been enabled. In
particular:

- The following tests seem to hang because a promise fails to resolve.
  We can detect such cases in non-worker tests because the process will
  exit without calling the WPT completion callback, but in worker tests
  the worker message ops will keep the event loop running. This will be
  fixed when we add timeouts to WPT tests (#9460).

  - `/fetch/api/basic/error-after-response.any.worker.html`
  - `/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker.html`
  - `/webmessaging/message-channels/worker-post-after-close.any.worker.html`
  - `/webmessaging/message-channels/worker.any.worker.html`
  - `/websockets/Create-on-worker-shutdown.any.worker.html`

- The following tests apparently hang because a promise rejection is
  never handled, which will kill the process in the main thread but not
  in workers (#12221).

  - `/streams/readable-streams/async-iterator.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker.html`
bartlomieju pushed a commit to bartlomieju/deno that referenced this issue Oct 10, 2021
Classic workers were implemented in denoland#11338, which also enabled the WPT
tests in the `workers` directory. However, the rest of WPT worker tests
were not enabled because a number of them were hanging due to
web-platform-tests/wpt#29777. Now that that WPT issue is fixed, the bulk
of worker tests can be enabled.

There are still a few tests that hang, and so haven't been enabled. In
particular:

- The following tests seem to hang because a promise fails to resolve.
  We can detect such cases in non-worker tests because the process will
  exit without calling the WPT completion callback, but in worker tests
  the worker message ops will keep the event loop running. This will be
  fixed when we add timeouts to WPT tests (denoland#9460).

  - `/fetch/api/basic/error-after-response.any.worker.html`
  - `/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker.html`
  - `/webmessaging/message-channels/worker-post-after-close.any.worker.html`
  - `/webmessaging/message-channels/worker.any.worker.html`
  - `/websockets/Create-on-worker-shutdown.any.worker.html`

- The following tests apparently hang because a promise rejection is
  never handled, which will kill the process in the main thread but not
  in workers (denoland#12221).

  - `/streams/readable-streams/async-iterator.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker.html`
@lucacasonato
Copy link
Member

We have this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted) tests related to tests
Projects
None yet
Development

No branches or pull requests

3 participants