8000 Writing snapshots is not thread safe · Issue #560 · syrupy-project/syrupy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Writing snapshots is not thread safe #560

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

Closed
zbyte64 opened this issue Oct 20, 2021 · 2 comments
Closed

Writing snapshots is not thread safe #560

zbyte64 opened this issue Oct 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@zbyte64
Copy link
zbyte64 commented Oct 20, 2021

Describe the bug

If one runs pytest -n auto tests --snapshot-update then one thread will overwrite the results of another thread in the same snapshot file or directory.

To reproduce

Steps to reproduce the behavior:

  1. Run your test suite with multiple threads enabled with the snapshot update flag
  2. Rerun your test suite without the snapshot update flag
  3. Observe error around missing snapshot entries

Expected behavior

Snapshot writing should either be thread safe or a warning should be present or documented.

Environment (please complete the following information):

  • OS: Ubuntu
  • Syrupy Version: 1.4.6
  • Python Version: 3.9.1
@noahnu
Copy link
Collaborator
noahnu commented Oct 20, 2021

Related to #535

@noahnu noahnu added the bug Something isn't working label Oct 20, 2021
@noahnu
Copy link
Collaborator
noahnu commented Oct 25, 2021

Closed as duplicate

@noahnu noahnu closed this as completed Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0