Skip to content

Commit

Permalink
Fix failure due to different sampling in JavaAPISuite.sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
srowen committed Oct 26, 2014
1 parent 16d66b8 commit 61a232f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/test/java/org/apache/spark/JavaAPISuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void sample() {
JavaRDD<Integer> rdd = sc.parallelize(ints);
JavaRDD<Integer> sample20 = rdd.sample(true, 0.2, 11);
// expected 2 but of course result varies randomly a bit
Assert.assertEquals(3, sample20.count());
Assert.assertEquals(1, sample20.count());
JavaRDD<Integer> sample20NoReplacement = rdd.sample(false, 0.2, 11);
Assert.assertEquals(2, sample20NoReplacement.count());
}
Expand Down

0 comments on commit 61a232f

Please sign in to comment.