diff options
author | zsxwing <zsxwing@gmail.com> | 2014-11-03 22:47:45 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-11-05 14:46:54 -0800 |
commit | 68be37b823516dbeda066776bb060bf894db4e95 (patch) | |
tree | 14d4b1f4d30e22a7c52ce35a91d9e3ce8913f3ce /core | |
parent | e0a043b79c250515a680485f0dc7b1a149835445 (diff) | |
download | spark-68be37b823516dbeda066776bb060bf894db4e95.tar.gz spark-68be37b823516dbeda066776bb060bf894db4e95.tar.bz2 spark-68be37b823516dbeda066776bb060bf894db4e95.zip |
[SPARK-4166][Core] Add a backward compatibility test for ExecutorLostFailure
Author: zsxwing <zsxwing@gmail.com>
Closes #3085 from zsxwing/SPARK-4166-back-comp and squashes the following commits:
89329f4 [zsxwing] Add a backward compatibility test for ExecutorLostFailure
Diffstat (limited to 'core')
-rw-r--r-- | core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala b/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala index 01030120ae..aec1e409db 100644 --- a/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala +++ b/core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala @@ -196,6 +196,15 @@ class JsonProtocolSuite extends FunSuite { assert(applicationStart === JsonProtocol.applicationStartFromJson(oldEvent)) } + test("ExecutorLostFailure backward compatibility") { + // ExecutorLostFailure in Spark 1.1.0 does not have an "Executor ID" property. + val executorLostFailure = ExecutorLostFailure("100") + val oldEvent = JsonProtocol.taskEndReasonToJson(executorLostFailure) + .removeField({ _._1 == "Executor ID" }) + val expectedExecutorLostFailure = ExecutorLostFailure("Unknown") + assert(expectedExecutorLostFailure === JsonProtocol.taskEndReasonFromJson(oldEvent)) + } + /** -------------------------- * | Helper test running methods | * --------------------------- */ |