cloud-fan commented on code in PR #43926: URL: https://github.com/apache/spark/pull/43926#discussion_r1400176679
########## core/src/test/scala/org/apache/spark/JobCancellationSuite.scala: ########## @@ -153,6 +153,91 @@ class JobCancellationSuite extends SparkFunSuite with Matchers with BeforeAndAft assert(jobB.get() === 100) } + test("if cancel job group and future jobs, skip running jobs in the same job group") { + sc = new SparkContext("local[2]", "test") + + val sem = new Semaphore(0) + sc.addSparkListener(new SparkListener { + override def onJobStart(jobStart: SparkListenerJobStart): Unit = { + sem.release() + } + }) + + val jobGroupName = "job-group" + + val jobA = Future { Review Comment: why do we run this job in a separated thread? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org