Return-Path: X-Original-To: apmail-crunch-commits-archive@www.apache.org Delivered-To: apmail-crunch-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6073B1845E for ; Thu, 16 Jul 2015 15:29:06 +0000 (UTC) Received: (qmail 53573 invoked by uid 500); 16 Jul 2015 15:28:32 -0000 Delivered-To: apmail-crunch-commits-archive@crunch.apache.org Received: (qmail 53540 invoked by uid 500); 16 Jul 2015 15:28:32 -0000 Mailing-List: contact commits-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list commits@crunch.apache.org Received: (qmail 53531 invoked by uid 99); 16 Jul 2015 15:28:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 15:28:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E62F7E3CA8; Thu, 16 Jul 2015 15:28:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jwills@apache.org To: commits@crunch.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: crunch git commit: CRUNCH-542: Eliminate flaky Scrunch sampling test. Date: Thu, 16 Jul 2015 15:28:31 +0000 (UTC) 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 Authored: Wed Jul 15 08:32:25 2015 -0700 Committer: Josh Wills 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 {