File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
core/src/test/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,15 @@ class JsonProtocolSuite extends FunSuite {
185
185
assert(applicationStart === JsonProtocol .applicationStartFromJson(oldEvent))
186
186
}
187
187
188
+ test(" ExecutorLostFailure backward compatibility" ) {
189
+ // ExecutorLostFailure in Spark 1.1.0 does not have an "Executor ID" property.
190
+ val executorLostFailure = ExecutorLostFailure (" 100" )
191
+ val oldEvent = JsonProtocol .taskEndReasonToJson(executorLostFailure)
192
+ .removeField({ _._1 == " Executor ID" })
193
+ val expectedExecutorLostFailure = ExecutorLostFailure (" Unknown" )
194
+ assert(expectedExecutorLostFailure === JsonProtocol .taskEndReasonFromJson(oldEvent))
195
+ }
196
+
188
197
/** -------------------------- *
189
198
| Helper test running methods |
190
199
* --------------------------- */
You can’t perform that action at this time.
0 commit comments