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

fix(sandbox): Prevent hanging child processes #402

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Oct 1, 2017

  • Rename SandboxCoordinator -> SandboxPool
  • Make sure newly created sandboxes are also disposed if the SandboxPool is already disposed

fixes #396

* Rename `SandboxCoordinator` -> `SandboxPool`
* Make sure newly created sandboxes are also disposed if the SandboxPool is already disposed

fixes #396
@nicojs
Copy link
Member Author

nicojs commented Oct 1, 2017

BTW this also fixes our flaky integration tests

public static create(options: Config, index: number, files: ReadonlyArray<File>, testFramework: TestFramework | null, coverageInstrumenter: CoverageInstrumenter | null)
: Promise<Sandbox> {
const sandbox = new Sandbox(options, index, files, testFramework, coverageInstrumenter);
return sandbox.initialize().then(() => sandbox);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this returns a promise that so when initialize completes, the sandbox object will be returned?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It was always required to call initialize after creating a sandbox. This way, there is no way you can forget doing it.

@simondel
Copy link
Member

simondel commented Oct 3, 2017

Epic! You figured out the issue 🥇

@simondel simondel merged commit ff6962a into master Oct 3, 2017
@simondel simondel deleted the fix-cleanup-sandboxes branch October 3, 2017 07:07
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

Successfully merging this pull request may close these issues.

Stryker not closing correctly with low number of mutants
2 participants