aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala b/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
index 8cb0a295b0..58664e77d2 100644
--- a/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
+++ b/core/src/test/scala/org/apache/spark/rdd/AsyncRDDActionsSuite.scala
@@ -65,9 +65,9 @@ class AsyncRDDActionsSuite extends SparkFunSuite with BeforeAndAfterAll with Tim
test("foreachAsync") {
zeroPartRdd.foreachAsync(i => Unit).get()
- val accum = sc.accumulator(0)
+ val accum = sc.longAccumulator
sc.parallelize(1 to 1000, 3).foreachAsync { i =>
- accum += 1
+ accum.add(1)
}.get()
assert(accum.value === 1000)
}
@@ -75,9 +75,9 @@ class AsyncRDDActionsSuite extends SparkFunSuite with BeforeAndAfterAll with Tim
test("foreachPartitionAsync") {
zeroPartRdd.foreachPartitionAsync(iter => Unit).get()
- val accum = sc.accumulator(0)
+ val accum = sc.longAccumulator
sc.parallelize(1 to 1000, 9).foreachPartitionAsync { iter =>
- accum += 1
+ accum.add(1)
}.get()
assert(accum.value === 9)
}