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

💥(worker) Only respawn workers on crash (not failure) #4993

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented May 16, 2024

Description

At the moment the worker package was not resilient to synchronous throws. As such doing so was considered identical to crashing the worker itself and caused new workers to be re-spawned.

With this PR, we properly handle synchronous throw triggered by the predicate. As such they are considered the same way as asynchronous ones.

Regarding isolation flags it changes a bit the behaviour. Following this change a synchronous throw will not trigger a new worker. New workers will only be created when the previous one crashes and exits.

ChecklistDon't delete this checklist and make sure you do the following before opening the PR

  • The name of my PR follows gitmoji specification
  • My PR references one of several related issues (if any)
    • New features or breaking changes must come with an associated Issue or Discussion
    • My PR does not add any new dependency without an associated Issue or Discussion
  • My PR includes bumps details, please run yarn bump and flag the impacts properly
  • My PR adds relevant tests and they would have failed without my PR (when applicable)

Advanced

  • Category: 💥 Breaking change and 🐛 Fix a bug
  • Impacts: Reboots of workers

@dubzzz dubzzz enabled auto-merge (squash) May 16, 2024 18:22
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b2170be:

Sandbox Source
@fast-check/examples Configuration

Copy link
Contributor

👋 A preview of the new documentation is available at: http://6646513f64a029007d29f704--dubzzz-fast-check.netlify.app

@dubzzz dubzzz merged commit d73ba8c into main May 16, 2024
59 checks passed
@dubzzz dubzzz deleted the no-dummy-respawn branch May 16, 2024 18:33
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.

1 participant