Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20449#discussion_r171486224
  
    --- Diff: core/src/test/scala/org/apache/spark/JobCancellationSuite.scala 
---
    @@ -40,6 +41,10 @@ class JobCancellationSuite extends SparkFunSuite with 
Matchers with BeforeAndAft
       override def afterEach() {
         try {
           resetSparkContext()
    +      // Reset semaphores if used by multiple tests.
    +      // Note: if other semaphores are shared by multiple tests, please 
reset them in this block
    +      JobCancellationSuite.taskStartedSemaphore.drainPermits()
    +      JobCancellationSuite.taskCancelledSemaphore.drainPermits()
    --- End diff --
    
    or we can make all semaphores local, so that we don't need to care about it.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to