Key tree property tests#1144
Conversation
09084af to
a8f4009
Compare
|
Need a review from someone more familiar with this code than I, I'm not willing to +1 this on my own. Also needs the conflict resolved in |
dad17cd to
24cd087
Compare
|
I am willing to +1 it, the tests themselves look good, but they, understandably, take a long time to run. I just re-run just that one suite on my not too weak MBP and it took @nickva do you think we can move it to a separate |
|
@eiri @wohali Thanks for taking a look I rebased it. I'll see maybe I'll try to reduce the branchiness and the generated sizes a bit to speed things up. So maybe it adds another 2-3 minutes but not 5 How are these times looking? |
Key tree module is a candidate to use property tests on as it mostly deals with manipulating a single data structure and functions are referentially transparent, that is, they aren't many side-effects like IO for example. The test consists of two main parts - generators and properties. Generators generate random input, for example revision trees, and properties check that certain properties hold, for example that after stemming all the leaves are still present in the revtree. To run the test: make eunit apps=couch suites=couch_key_tree_prop_tests
24cd087 to
716ca59
Compare
|
Ok, |
|
For posterity, we need to mirror new dependencies into Apache infrastructure when adding them - not just check that they are compatibly licensed. This should have been done at the same time as this merge landing. |
Key tree module is a candidate to use property tests on as it mostly deals with
manipulating a single data structure and functions are referentially
transparent, that is, they aren't many side-effects like IO for example.
The test consists of two main parts - generators and properties.
Generators generate random input, for example revision trees, and properties
check that certain properties hold, for example that after stemming all the
leaves are still present in the revtree.
To run the test:
make eunit apps=couch suites=couch_key_tree_prop_tests