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

Better process isolation #165

Open
DRMacIver opened this issue Sep 25, 2015 · 4 comments
Open

Better process isolation #165

DRMacIver opened this issue Sep 25, 2015 · 4 comments
Labels
enhancement it's not broken, but we want it to be better

Comments

@DRMacIver
Copy link
Member

Currently if you want to have process isolation for your tests you can use the forking executor.

But you probably shouldn’t. It has a number of weird limitations: It may (usually will) interact poorly with how test runners capture output, and for reasons that will be completely opaque to you but make sense I promise some examples will not minimize correctly.

I’d like to make this better and integrate it more thoroughly into Hypothesis, so it’s just a config item to get process isolation and it should transparently work with things. Ideally this would give built in parallel test execution too.

This may end up dependent on conjecture integration

@DRMacIver DRMacIver added this to the Hypothesis 2.0 milestone Sep 25, 2015
@DRMacIver DRMacIver added the enhancement it's not broken, but we want it to be better label Sep 25, 2015
@Zac-HD
Copy link
Member

Zac-HD commented May 23, 2017

Closing this, as Conjecture has been part of Hypothesis since 3.0 and we run our own tests with multiple processes so it must be working!

@Zac-HD Zac-HD closed this as completed May 23, 2017
@DRMacIver DRMacIver reopened this May 23, 2017
@DRMacIver
Copy link
Member Author

Nope. This is specifically about running each example in its own subprocess, not whole tests.

@Zac-HD
Copy link
Member

Zac-HD commented May 23, 2017

Ooh, okay. Sounds expensive but I can see that it would make sense sometimes.

@Zac-HD Zac-HD removed this from the Hypothesis 2.0 milestone Mar 1, 2018
@Zac-HD
Copy link
Member

Zac-HD commented Apr 25, 2020

In #2340, it took a while to work out that the code under test was hanging, and so the engine code could neither see that settings.deadline was exceeded nor abort the test. Running each test case in a separate process would let us avoid this classic failure mode of cooperative task scheduling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement it's not broken, but we want it to be better
Projects
None yet
Development

No branches or pull requests

2 participants