Repository: crunch Updated Branches: refs/heads/master a727606ea -> 16209bed6
CRUNCH-542: Eliminate flaky Scrunch sampling test. Project: http://git-wip-us.apache.org/repos/asf/crunch/repo Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/16209bed Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/16209bed Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/16209bed Branch: refs/heads/master Commit: 16209bed6f2290352807bf7d1796a5188d974702 Parents: a727606 Author: Josh Wills <[email protected]> Authored: Wed Jul 15 08:32:25 2015 -0700 Committer: Josh Wills <[email protected]> Committed: Thu Jul 16 07:52:55 2015 -0700 ---------------------------------------------------------------------- .../org/apache/crunch/scrunch/PCollectionTest.scala | 16 ---------------- 1 file changed, 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/crunch/blob/16209bed/crunch-scrunch/src/it/scala/org/apache/crunch/scrunch/PCollectionTest.scala ---------------------------------------------------------------------- diff --git a/crunch-scrunch/src/it/scala/org/apache/crunch/scrunch/PCollectionTest.scala b/crunch-scrunch/src/it/scala/org/apache/crunch/scrunch/PCollectionTest.scala index 6d42ed6..3c232b1 100644 --- a/crunch-scrunch/src/it/scala/org/apache/crunch/scrunch/PCollectionTest.scala +++ b/crunch-scrunch/src/it/scala/org/apache/crunch/scrunch/PCollectionTest.scala @@ -71,22 +71,6 @@ class PCollectionTest extends CrunchSuite { } /** - * Tests sampling elements from a PCollection using some acceptance probability. - */ - @Test def testSampling { - // Get the collection and sample ten percent. - val shakespeare = shakespeareCollection - val sampledCollection = shakespeare.sample(0.10) - val length = sampledCollection.length().value() - // The number of lines in the sampled collection should be about ten percent of the lines in - // the original collection. We use a tolerance of +- 50. - val lower = linesInShakespeare * 0.10 - 50 - val upper = linesInShakespeare * 0.10 + 50 - assertTrue("Sampled collection contains too few elements.", lower <= length) - assertTrue("Sampled collection contains too many elements.", length <= upper) - } - - /** * Tests sampling elements from a PCollection using some acceptance probability and a seed. */ @Test def testSamplingWithSeed {
