You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/03/17 04:50:49 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #40418: [SPARK-42790][SQL] Abstract the excluded method for better test for JDBC docker tests.

cloud-fan commented on code in PR #40418:
URL: https://github.com/apache/spark/pull/40418#discussion_r1139727723


##########
core/src/test/scala/org/apache/spark/SparkFunSuite.scala:
##########
@@ -137,6 +138,19 @@ abstract class SparkFunSuite
     java.nio.file.Paths.get(sparkHome, first +: more: _*)
   }
 
+  // subclasses can override this to exclude certain tests by name
+  // useful when inheriting a test suite but do not want to run all tests in it
+  protected def excluded: Seq[String] = Seq.empty
+
+  override protected def test(testName: String, testTags: Tag*)(testBody: => Any)
+    (implicit pos: Position): Unit = {
+    if (excluded.contains(testName)) {
+      ignore(s"$testName [enable by remove from $excluded]")(testBody)

Review Comment:
   this will make the test name very long, how about just `test name (excluded)`



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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