You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2025/01/07 09:13:34 UTC

(spark) branch master updated: [MINOR][TESTS] Fix comments on `runIfTestsEnabled` methods

This is an automated email from the ASF dual-hosted git repository.

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 204c67298117 [MINOR][TESTS] Fix comments on `runIfTestsEnabled` methods
204c67298117 is described below

commit 204c6729811789cd271627f5d45dfda92176e119
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Jan 7 17:13:21 2025 +0800

    [MINOR][TESTS] Fix comments on `runIfTestsEnabled` methods
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix comments on `runIfTestsEnabled` methods.
    
    ### Why are the changes needed?
    
    Apache Spark repository has two `runIfTestsEnabled` methods whose comments are wrong or ambiguous.
    
    ```
    $ git grep -C1 'def runIfTestsEnabled'
    connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala-  /** Run the give body of code only if Kinesis tests are enabled */
    connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala:  def runIfTestsEnabled(message: String)(body: => Unit): Unit = {
    connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala-    if (shouldRunTests) {
    --
    connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala-  /** Run the give body of code only if Kinesis tests are enabled */
    connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala:  def runIfTestsEnabled(message: String)(body: => Unit): Unit = {
    connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala-    if (shouldRunTests) {
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, this is a comment revision.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #49393 from dongjoon-hyun/minor2.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: yangjie01 <ya...@baidu.com>
---
 .../scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala     | 2 +-
 .../test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala
index 9fbbc8ed2e0f..b560f86ade38 100644
--- a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala
+++ b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/DockerIntegrationFunSuite.scala
@@ -43,7 +43,7 @@ trait DockerIntegrationFunSuite extends SparkFunSuite {
     }
   }
 
-  /** Run the give body of code only if Kinesis tests are enabled */
+  /** Run the given body of code only if ENABLE_DOCKER_INTEGRATION_TESTS is 1. */
   def runIfTestsEnabled(message: String)(body: => Unit): Unit = {
     if (shouldRunTests) {
       body
diff --git a/connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala b/connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala
index 8dc4de1aa360..7098840d62f9 100644
--- a/connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala
+++ b/connector/kinesis-asl/src/test/scala/org/apache/spark/streaming/kinesis/KinesisFunSuite.scala
@@ -35,7 +35,7 @@ trait KinesisFunSuite extends SparkFunSuite  {
     }
   }
 
-  /** Run the give body of code only if Kinesis tests are enabled */
+  /** Run the given body of code only if ENABLE_KINESIS_TESTS is 1. */
   def runIfTestsEnabled(message: String)(body: => Unit): Unit = {
     if (shouldRunTests) {
       body


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