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

Mediate access to mock server with a mutex #29

Closed
Diggsey opened this issue Apr 14, 2018 · 2 comments
Closed

Mediate access to mock server with a mutex #29

Diggsey opened this issue Apr 14, 2018 · 2 comments
Labels

Comments

@Diggsey
Copy link
Contributor

Diggsey commented Apr 14, 2018

The docs currently recommend running tests with --test-threads=1, but this means that none of the tests can be run in parallel.

A simple solution without changing the design would be to take a global mutex whenever the first mock end-point is created on a thread, and release that mutex whenever the last mock end-point is dropped.

@lipanski
Copy link
Owner

it's not solving the core problem but it could allow tests not using mocks to perform in parallel, which is neat. would you be interested in making a PR?

@lipanski
Copy link
Owner

Closed by #35
@Diggsey please let me know if this works for you. Also, if it happens that you're using mocks inside doctests, please check #36

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

No branches or pull requests

2 participants