Skip to content

Commit

Permalink
[SPARK-4166][Core] Add a backward compatibility test for ExecutorLost…
Browse files Browse the repository at this point in the history
…Failure

Author: zsxwing <zsxwing@gmail.com>

Closes apache#3085 from zsxwing/SPARK-4166-back-comp and squashes the following commits:

89329f4 [zsxwing] Add a backward compatibility test for ExecutorLostFailure
  • Loading branch information
zsxwing authored and Andrew Or committed Nov 4, 2014
1 parent 9bdc841 commit b671ce0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
* --------------------------- */
Expand Down

0 comments on commit b671ce0

Please sign in to comment.