You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "jiaan.geng (Jira)" <ji...@apache.org> on 2020/07/01 10:05:00 UTC
[jira] [Commented] (SPARK-31846) DAGSchedulerSuite: For the pattern
of cancel + assert, extract the general method
[ https://issues.apache.org/jira/browse/SPARK-31846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149270#comment-17149270 ]
jiaan.geng commented on SPARK-31846:
------------------------------------
According discussion between wuyi and me. It's not worth to do this.
Please references my fork branch
https://github.com/beliefer/spark/commit/09ed72589a2bbd201f9c6bb61999b8b066026090
> DAGSchedulerSuite: For the pattern of cancel + assert, extract the general method
> ---------------------------------------------------------------------------------
>
> Key: SPARK-31846
> URL: https://issues.apache.org/jira/browse/SPARK-31846
> Project: Spark
> Issue Type: Sub-task
> Components: Spark Core
> Affects Versions: 3.1.0
> Reporter: jiaan.geng
> Priority: Major
>
> DAGSchedulerSuite exists many test case(e.g. trivial job cancellation | job cancellation no-kill backend) contains the pattern of cancel + assert, such as:
> {code:java}
> test("trivial job cancellation") {
> val rdd = new MyRDD(sc, 1, Nil)
> val jobId = submit(rdd, Array(0))
> cancel(jobId)
> assert(failure.getMessage === s"Job $jobId cancelled ")
> assert(sparkListener.failedStages === Seq(0))
> assertDataStructuresEmpty()
> }
> {code}
> We should extract the general method like cancelAndCheck(jobId: Int, predicate)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org