playwright/tests
Max Schmitt 4431a8366d
fix: collect stdio from forked processes (#27074)
A summary about the attempts we tried in
https://github.com/microsoft/playwright/pull/26931 for
https://github.com/microsoft/playwright/issues/26859 and
https://github.com/microsoft/playwright/issues/24591.

1. attempt: collect all the stdio from the worker host.
- this made it hard to capture the live console logs for the live trace
2. attempt: collect all the stdio from the worker host, but keep
proxying `process.{stdout,stderr}.write`.
- this solved the live console logs problem, since we could still listen
on them
- we found out about a race that the stdout/stderr streams can still
buffer data while the test already had finished
- we created a best effort flush implementation but didn't like the
complexity it introduced to the project
3. attempt: keep things like they are but also listen to stdio from the
worker host
- this solves the race of console.log in the test (things stay like they
are)
    - this keeps live trace working (things stay like they are)
- a known pitfall is that it could result in logs which don't end up in
the reporter onStdOut/onStdErr, but it is already a significant
improvement over how it was before.
      - before: they were not getting displayed
- after: they are getting displayed and there is a low likelihood that
they don't end up in the reporter API if the write happens slightly
before a test finished.

Closes #26931
Fixes #26859
Fixes #24591
2023-09-14 18:34:26 +02:00
..
android test: roll android chromium to 1190572 (#26807) 2023-08-31 18:08:27 +02:00
assets chore: do not leak internal page handles after closing page (#24169) 2023-07-12 14:51:13 -07:00
components chore: make @playwright/test depend on playwright (#26946) 2023-09-08 14:23:35 -07:00
config chore: store scroll positions in trace viewer (#26938) 2023-09-07 17:14:39 -07:00
electron feat(electron): support tracesDir option (#23947) 2023-06-28 16:32:16 -07:00
image_tools fix(ssim-cie94): make sure a single off pixel yields diff in comparator (#24348) 2023-07-21 12:27:52 -07:00
installation chore: make @playwright/test depend on playwright (#26946) 2023-09-08 14:23:35 -07:00
library test: fix webkit test on Darwin (#27029) 2023-09-12 15:01:44 -07:00
page test: init script runs onces in iframes (#27057) 2023-09-13 09:46:59 -07:00
playwright-test fix: collect stdio from forked processes (#27074) 2023-09-14 18:34:26 +02:00
stress chore: add firefox-asan for stress tests (#24049) 2023-07-19 05:53:52 -07:00
webview2 devops: do not upload test-results artifacts (#23168) 2023-05-19 13:06:42 -07:00
.eslintrc.js chore: enable no-floating-promises ESLint rule for tests (#23376) 2023-06-02 21:59:12 +02:00
index.d.ts test: added tests for WebSocket over Socks proxy (#7235) 2021-06-24 18:50:16 +02:00
tsconfig.json chore: render test steps in the trace (#22837) 2023-05-05 15:12:18 -07:00