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 <[email protected]>
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 <[email protected]>
    Signed-off-by: yangjie01 <[email protected]>
---
 .../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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to