-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 fuzzing based tests in Jest (retry PR8012) #8164
Conversation
We've actually had a failure on ci with the same error after reverting. So I think we're probably pretty close to some limit, and this just pushed us over. Not sure how to best debug this |
In a way, it's pretty reassuring for this PR, but indeed the memory issue in CI is a pretty blocking issue :/ Did you try to play with |
No, haven't done anything with it |
According to nodejs/node#7937 (comment) which references https://github.com/nodejs/node/blob/ec02b811a8a5c999bab4de312be2d732b7d9d50b/deps/v8/src/heap/heap.cc#L82, the size for a 64bits system would be |
It happened again :'( |
It shouldn't need any different config than the other runs with jasmine. But feel free to tweak the |
This reverts commit 13b4412.
It should provide a better memory footprint. Previously the default value of maxKeys was 10 (not accessible by the end-user in previous version). The value has been reduced to 5 as it should already be enough to detect most of problems related to objects.
33bfe77
to
b63f1c8
Compare
Codecov Report
@@ Coverage Diff @@
## master #8164 +/- ##
======================================
Coverage 62.3% 62.3%
======================================
Files 265 265
Lines 10473 10473
Branches 2542 2542
======================================
Hits 6525 6525
Misses 3366 3366
Partials 582 582 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @SimenB are there still concerns about memory usage making CI flaky?
This has probably been alleviated by @scotthovestadt's work. Great stuff, thanks again @dubzzz! (I'll respond to your RFC when I'm able to get my head above water, I feel bad for letting it linger 😞) |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Following discussions with @jeysal and @SimenB in the PR #7938, I open a PR to add property based tests into the CI of Jest.
In a nutshell what it property based testing:
Property based can be classified as being some kind of fuzzing technic. The need for such technic comes from the fact that it is difficult and barely impossible to cover all the edge cases a code can have with classical unit-tests (so called example based tests).
Property based framework relies on assessing whether a property stays true for any valid inputs. It can be summarized by the following mathematical statement:
In case of failure, it is able to reduce the randomly generated
x
,y
to smaller entries to be more human readable.