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

[Question]Generating video file took few seconds and it's prolong significantly the test duration #5350

Closed
hananmalka opened this issue Feb 8, 2021 · 5 comments

Comments

@hananmalka
Copy link

Hi,
I have a suite of tests that takes ~3 minutes without using the awesome video feature and ~4+ minutes (133%) with the video feature.

I looked at the logs and saw that each context closing takes few more seconds than without video.

2021-02-08T10:52:04.726Z pw:api => browserContext.close started
2021-02-08T10:52:15.962Z pw:api <= browserContext.close succeeded
Success notification after 11 seconds
2021-02-08T10:51:11.580Z pw:api => browserContext.close started
2021-02-08T10:51:20.406Z pw:api <= browserContext.close succeeded
Success notification after 9 seconds

Is there a way to prevent this duration increase?

@mxschmitt
Copy link
Member

Could you provide more details about your environment? Playwright version, browser, Operating system.

(The Chromium implementation afaik is processing it fully at the end so its depended on how long your page instance was opened how long the close and by that the video processing takes.)

@hananmalka
Copy link
Author

hananmalka commented Feb 8, 2021

Thanks @mxschmitt for the response.
Details:
Playwright version: 1.8.0
Chromium version: 90.0.4392.0
OS: MacOS Catalina (10.15.7) (Local)
OS (Jenkins): ubuntu 16.04

I'm creating page and context objects per test and closing them in the afterEach (jest).
Tests duration are between 5-30 seconds.

@dgozman
Copy link
Contributor

dgozman commented Feb 8, 2021

Duplicate of #5051.

@dgozman dgozman closed this as completed Feb 8, 2021
@hananmalka
Copy link
Author

hananmalka commented Feb 8, 2021

Duplicate of #5051.

@dgozman - Do you mean it's the same in the aspect that it's a bug?
According to @pavelfeldman in the mentioned ticket, the reason for this is that he isn't closing the context per test.
I do close the context & page after each test, and still, the notification of context close success is being reached only after 15-20 seconds.

@dgozman
Copy link
Contributor

dgozman commented Feb 8, 2021

@hananmalka The actual reason is that saving video is sometimes slow, as you say in this issue. We are working on fixing this. It just happened that #5051 has an additional problem of reusing context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants