Skip to content

Tests (running with Xdist) have a long pause at the end. #5759

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

Open
paul-ollis opened this issue Apr 22, 2025 · 4 comments
Open

Tests (running with Xdist) have a long pause at the end. #5759

paul-ollis opened this issue Apr 22, 2025 · 4 comments

Comments

@paul-ollis
Copy link
Contributor

The bug

I see an approximate 5 second pause at the end of test runs when Xdist is used. During this time the Xdist workers consume about 100% of a CPU core each.

This is cause by syrupy's pytest_terminal_summary hook function being executed in workers, for reasons I do not understand.

I have created a pytest_textual_snapshot PR (Textualize/pytest-textual-snapshot#20) that provides a work-around for this.

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

I assumed this was the result of saving all the SVGs. Are you certain the workaround doesn't break the snapshot test report?

@paul-ollis
Copy link
Contributor Author

@willmcgugan That was my initial guess too, but that part is really fast. I have generated snapshot reports OK with this change in place. The syrupy plugin is active in each worker for most of the run, only being disabled in pytest_sessionfinish, which is after all the snapshot work has been performed.

@paul-ollis
Copy link
Contributor Author

Now that Textualize/pytest-textual-snapshot#20 is merged, can this be closed?

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

2 participants