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

✨ Add fc.scheduler arbitrary #479

Merged
merged 47 commits into from Nov 27, 2019
Merged

✨ Add fc.scheduler arbitrary #479

merged 47 commits into from Nov 27, 2019

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Nov 13, 2019

Why is this PR for?

Race conditions are the most difficult to debug and to detect issues. Property basedtesting might help to detect such issues earlier by resolving promises in a random order to uncover unexpected orderings causing crashes in our apps.

PR is at a very very early stage. Tests are missings, code is in a single file...
For the moment, I need to gather cases that can be used to illustrate the purpose of such arbitrary. I will put some of those examples into test/e2e/AsyncScheduler.spec.ts .

In a nutshell

✔️ New feature
❌ Fix an issue
❌ Documentation improvement
❌ Other: please explain

(✔️: yes, ❌: no)

Potential impacts

None.

@coveralls
Copy link

coveralls commented Nov 13, 2019

Coverage Status

Coverage increased (+0.2%) to 96.316% when pulling 5121fa6 on feat/async-scheduler into 7f06ded on master.

const handle = buildGraph(initialPackageName, fetch);
// Or: await s.waitAll();
while (s.count() !== 0) {
expect(s.count()).toBeLessThanOrEqual(Object.keys(allPackages).length);
Copy link
Owner Author

Choose a reason for hiding this comment

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

We might add a maxThreadPoolSize parameters with a quitehigh initial value or force the users to define one

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 13, 2019

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 5121fa6:

Sandbox Source
flamboyant-framework-gsmk9 Configuration
fast-check-examples Configuration

@dubzzz dubzzz marked this pull request as ready for review November 26, 2019 21:27
@dubzzz dubzzz changed the title 🚧✨ Add fc.scheduler arbitrary ✨ Add fc.scheduler arbitrary Nov 26, 2019
@dubzzz dubzzz merged commit 5bcf5e5 into master Nov 27, 2019
@dubzzz dubzzz deleted the feat/async-scheduler branch November 27, 2019 05:34
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.

None yet

2 participants