diff options
author | Ali Ghodsi <alig@cs.berkeley.edu> | 2013-08-19 19:14:30 -0700 |
---|---|---|
committer | Ali Ghodsi <alig@cs.berkeley.edu> | 2013-08-20 16:16:05 -0700 |
commit | c0942a710f25c9c690761b0814a07deacd4df595 (patch) | |
tree | ca24f6e3da1fe41ba9ced1dc8e8047a76c7d5b32 /core/src/test/scala | |
parent | 5db41919b5aafcad050726601c6f3be8e0bf879a (diff) | |
download | spark-c0942a710f25c9c690761b0814a07deacd4df595.tar.gz spark-c0942a710f25c9c690761b0814a07deacd4df595.tar.bz2 spark-c0942a710f25c9c690761b0814a07deacd4df595.zip |
Bug in test fixed
Diffstat (limited to 'core/src/test/scala')
-rw-r--r-- | core/src/test/scala/spark/RDDSuite.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/test/scala/spark/RDDSuite.scala b/core/src/test/scala/spark/RDDSuite.scala index 3c1b387d16..e306952bbd 100644 --- a/core/src/test/scala/spark/RDDSuite.scala +++ b/core/src/test/scala/spark/RDDSuite.scala @@ -176,9 +176,9 @@ class RDDSuite extends FunSuite with SharedSparkContext { } test("cogrouped RDDs with locality") { val data3 = sc.makeRDD(List((1,List("a","c")), (2,List("a","b","c")), (3,List("b")))) - val coalesced3 = data3.coalesce(3) - val list3 = coalesced3.partitions.map(p => p.asInstanceOf[CoalescedRDDPartition]) - assert(list3.map(p => p.preferredLocation).length === 3, "Locality preferences are dropped") + val coal3 = data3.coalesce(3) + val list3 = coal3.partitions.map(p => p.asInstanceOf[CoalescedRDDPartition].preferredLocation) + assert(list3.sorted === Array("a","b","c"), "Locality preferences are dropped") // RDD with locality preferences spread (non-randomly) over 6 machines, m0 through m5 val data = sc.makeRDD((1 to 9).map(i => (i, (i to (i+2)).map{ j => "m" + (j%6)}))) |