aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2012-09-26 00:25:34 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2012-09-26 00:25:34 -0700
commitd71a358c4619037053e7f723568282f52c2ad2e0 (patch)
treecff75cf56568247490497859b83870ab92acb862 /core/src/test/scala
parentd51d5e0582c0605deae7497cd95a055698dc9383 (diff)
downloadspark-d71a358c4619037053e7f723568282f52c2ad2e0.tar.gz
spark-d71a358c4619037053e7f723568282f52c2ad2e0.tar.bz2
spark-d71a358c4619037053e7f723568282f52c2ad2e0.zip
Fixed a test that was getting extremely lucky before, and increased the
number of samples used for sorting
Diffstat (limited to 'core/src/test/scala')
-rw-r--r--core/src/test/scala/spark/SortingSuite.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/test/scala/spark/SortingSuite.scala b/core/src/test/scala/spark/SortingSuite.scala
index 8fa1442a4d..188a9b564e 100644
--- a/core/src/test/scala/spark/SortingSuite.scala
+++ b/core/src/test/scala/spark/SortingSuite.scala
@@ -58,11 +58,11 @@ class SortingSuite extends FunSuite with BeforeAndAfter with ShouldMatchers with
val sorted = sc.parallelize(pairArr, 4).sortByKey()
assert(sorted.collect() === pairArr.sortBy(_._1))
val partitions = sorted.collectPartitions()
- logInfo("partition lengths: " + partitions.map(_.length).mkString(", "))
- partitions(0).length should be > 200
- partitions(1).length should be > 200
- partitions(2).length should be > 200
- partitions(3).length should be > 200
+ logInfo("Partition lengths: " + partitions.map(_.length).mkString(", "))
+ partitions(0).length should be > 180
+ partitions(1).length should be > 180
+ partitions(2).length should be > 180
+ partitions(3).length should be > 180
partitions(0).last should be < partitions(1).head
partitions(1).last should be < partitions(2).head
partitions(2).last should be < partitions(3).head
@@ -75,10 +75,10 @@ class SortingSuite extends FunSuite with BeforeAndAfter with ShouldMatchers with
assert(sorted.collect() === pairArr.sortBy(_._1).reverse)
val partitions = sorted.collectPartitions()
logInfo("partition lengths: " + partitions.map(_.length).mkString(", "))
- partitions(0).length should be > 200
- partitions(1).length should be > 200
- partitions(2).length should be > 200
- partitions(3).length should be > 200
+ partitions(0).length should be > 180
+ partitions(1).length should be > 180
+ partitions(2).length should be > 180
+ partitions(3).length should be > 180
partitions(0).last should be > partitions(1).head
partitions(1).last should be > partitions(2).head
partitions(2).last should be > partitions(3).head