You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Galen O'Sullivan <go...@pivotal.io> on 2017/02/02 21:20:36 UTC

Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

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

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 

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


Re: Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

Posted by Kirk Lund <ki...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56242/#review164041
-----------------------------------------------------------


Ship it!




Ship It!

- Kirk Lund


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
> 
>


Re: Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

Posted by Bruce Schuchardt <bs...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56242/#review164353
-----------------------------------------------------------


Ship it!




Ship It!

- Bruce Schuchardt


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
> 
>


Re: Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

Posted by Udo Kohlmeyer <uk...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56242/#review164398
-----------------------------------------------------------


Ship it!




Ship It!

- Udo Kohlmeyer


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
> 
>


Re: Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

Posted by xiaojian zhou <zh...@gmail.com>.
-----------------------------------------------------------
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
> 
>


Re: Review Request 56242: GEODE-2206: Add junit-quickcheck to geode-core; add a test that uses it.

Posted by Galen O'Sullivan <go...@pivotal.io>.
-----------------------------------------------------------
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.


Changes
-------

Put versions in `gradle/dependency-versions.properties`.


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 (updated)
-----

  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