Skip to content

Commit 021c0a5

Browse files
committed
address comment
1 parent 2be2ca7 commit 021c0a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/test/scala/org/apache/spark/scheduler/BarrierTaskContextSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ class BarrierTaskContextSuite extends SparkFunSuite with LocalSparkContext with
7171
val messages: Array[String] = context.allGather(message)
7272
Iterator.single(messages.toList)
7373
}
74-
// Take a sorted list of all the partitionId messages
75-
val messages = rdd2.collect().head
76-
// All the task partitionIds are shared
77-
assert(messages === List("0", "1", "2", "3"))
74+
val messages = rdd2.collect()
75+
// All the task partitionIds are shared across all tasks
76+
assert(messages.length === 4)
77+
assert(messages.forall(_ == List("0", "1", "2", "3")))
7878
}
7979

8080
test("throw exception if we attempt to synchronize with different blocking calls") {

0 commit comments

Comments
 (0)