LuciferYang commented on code in PR #41590:
URL: https://github.com/apache/spark/pull/41590#discussion_r1229032984


##########
core/src/test/scala/org/apache/spark/SparkFunSuite.scala:
##########
@@ -147,7 +150,9 @@ abstract class SparkFunSuite
     if (excluded.contains(testName)) {
       ignore(s"$testName (excluded)")(testBody)
     } else {
-      super.test(testName, testTags: _*)(testBody)
+      super.test(testName, testTags: _*)(
+        failAfter(10.minutes)(testBody)

Review Comment:
   @zhengruifeng Like this, I gave a simple test
   
   For example, change `failAfter(10.minutes)(testBody)` to 
`failAfter(100.millis)(testBody)`, then run a test like
   ```
     test("timeout") {
       Thread.sleep(2000)
     }
   ```
   
   then 
   
   ```
   [info] - timeout *** FAILED *** (2 seconds, 35 milliseconds)
   [info]   The code passed to failAfter did not complete within 100 
milliseconds. (DistributionSuite.scala:27)
   [info]   org.scalatest.exceptions.TestFailedDueToTimeoutException:
   [info]   at java.lang.Thread.getStackTrace(Thread.java:1564)
   ```
   
   and other test will continue to execute
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to