-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix(electron): tracing with @playwright/test #31437
Conversation
This comment has been minimized.
This comment has been minimized.
b2a2232
to
a49e958
Compare
a49e958
to
a7b0496
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think you are on the right track, but I don't think that is the right place for the fix. Consider a situation where tracing is started, but no trace events are emitted. As the trace file is created lazily, it won't be there when stopping the trace either. So the fix should rather remove the non-existing temporary files from the list before iterating over them in mergeTraceFiles. You can probably test it using the ttest rather than an installation test btw. |
This reverts commit 8f67ee1.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"8 flaky28408 passed, 655 skipped Merge workflow run. |
Test results for "tests others"2 flaky17787 passed, 482 skipped Merge workflow run. |
Test results for "tests 2"4 fatal errors, not part of any test 92 flaky206326 passed, 9230 skipped, 1390 did not run Merge workflow run. |
Fixes #31473
This regressed in e7a11c0#diff-d7c041137e763edae5c4d18bc8ded9a1ac668078e310712341c444ef3aac423b - v1.45.0.
When Electron browser context gets closed, the request object gets disposed. But tracing was never started on the Electron request instance. This throws now:
In normal PWT setup, this is not a problem, since we already start the tracing before. But since we don't check if the Tracing has been started, it throws now, that we didn't start it before.
I see two solutions:
a) We call didCreateContext in Electron, see footnote
b) just ignore the stop call, it wasn't marked with the start symbol.