-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56242/#review164943
-----------------------------------------------------------


Ship it!




cool stuff!

- xiaojian zhou


On Feb. 2, 2017, 9:35 p.m., Galen O'Sullivan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56242/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2017, 9:35 p.m.)
> 
> 
> Review request for geode, Bruce Schuchardt, Hitesh Khamesra, Kirk Lund, and 
> Udo Kohlmeyer.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> This adds a test dependency on `junit-quickcheck` (and 
> `junit-quickcheck-generators` and `junit-quickcheck-guava`) to geode-core. 
> I've included an example test of one of the cases in which property-based 
> testing is particularly nice: when you have two operations that should 
> reverse each other and want to test them with as much garbage as possible.
> 
> Property-based testing means basically that you write a function that tests 
> some code and checks some conditions you expect to hold true for all inputs, 
> and then have a computer program test all sorts of weird inputs to try prove 
> you wrong.
> 
> Because the test data is randomly generated, you get to test against more 
> inputs than you might even think of, and because the seed is saved, the test 
> is reproducible. If `junit-quickcheck` finds one failure, it will even try to 
> narrow down to a smallest example of a test failure.
> 
> I'm about to send an email to the dev list soliciting feedback.
> 
> 
> Diffs
> -----
> 
>   geode-core/build.gradle 3c2a2abf5 
>   
> geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerQuickcheckStringTest.java
>  PRE-CREATION 
>   
> geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerRandomizedJUnitTest.java
>  f361de4a2 
>   gradle/dependency-versions.properties fbc76e012 
> 
> Diff: https://reviews.apache.org/r/56242/diff/
> 
> 
> Testing
> -------
> 
> The test passes on my machine. This is mostly just adding a dependency, so 
> there's not a lot here to test.
> 
> I've read some of the source of junit-quickcheck and looked into the data it 
> generates: integral numbers seem pretty reasonable. Strings tend to be 
> short-ish (length up to hundreds with hundreds of iterations, thousands with 
> thousands), but are made up of random codepoints, which is nice.
> 
> 
> Thanks,
> 
> Galen O'Sullivan
> 
>

Reply via email to