You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by artemrd <gi...@git.apache.org> on 2018/05/08 23:29:56 UTC
[GitHub] spark pull request #21114: [SPARK-22371][CORE] Return None instead of throwi...
Github user artemrd commented on a diff in the pull request:
https://github.com/apache/spark/pull/21114#discussion_r186896584
--- Diff: core/src/test/scala/org/apache/spark/AccumulatorSuite.scala ---
@@ -209,10 +209,8 @@ class AccumulatorSuite extends SparkFunSuite with Matchers with LocalSparkContex
System.gc()
assert(ref.get.isEmpty)
- // Getting a garbage collected accum should throw error
- intercept[IllegalStateException] {
- AccumulatorContext.get(accId)
- }
+ // Getting a garbage collected accum should return None.
+ assert(AccumulatorContext.get(accId).isEmpty)
--- End diff --
Added a test.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org