Skip to content

Commit

Permalink
fixed broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
brkyvz committed Apr 29, 2015
1 parent f400ade commit 3c11d1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/test/java/org/apache/spark/JavaAPISuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ public void sample() {
public void randomSplit() {
List<Integer> ints = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
JavaRDD<Integer> rdd = sc.parallelize(ints);
JavaRDD<Integer>[] splits = rdd.randomSplit(new double[] { 0.4, 0.6, 1.0 }, 11);
JavaRDD<Integer>[] splits = rdd.randomSplit(new double[] { 0.4, 0.6, 1.0 }, 31);
Assert.assertEquals(3, splits.length);
Assert.assertEquals(2, splits[0].count());
Assert.assertEquals(3, splits[1].count());
Assert.assertEquals(5, splits[2].count());
Assert.assertEquals(1, splits[0].count());
Assert.assertEquals(2, splits[1].count());
Assert.assertEquals(7, splits[2].count());
}

@Test
Expand Down

0 comments on commit 3c11d1b

Please sign in to comment.