This is an automated email from the ASF dual-hosted git repository. dongjoon 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 e371c53350b [SPARK-41466][BUILD] Change Scala Style configuration to catch AnyFunSuite instead of FunSuite e371c53350b is described below commit e371c53350b179fc095397a0cd111aa4085b8219 Author: Hyukjin Kwon <gurwls...@apache.org> AuthorDate: Fri Dec 9 09:31:26 2022 -0800 [SPARK-41466][BUILD] Change Scala Style configuration to catch AnyFunSuite instead of FunSuite ### What changes were proposed in this pull request? This PR is technically a followup of https://github.com/apache/spark/pull/29196 that changes Scala Style configuration to catch `AnyFunSuite` instead of `FunSuite`. ### Why are the changes needed? To keep the original intention of the Scala style configuration. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? Manually tested with `./dev/lint-scala`. CI in this PR should test it out too. Closes #39004 from HyukjinKwon/SPARK-41466. Authored-by: Hyukjin Kwon <gurwls...@apache.org> Signed-off-by: Dongjoon Hyun <dongj...@apache.org> --- .../spark/sql/connect/planner/LiteralValueProtoConverterSuite.scala | 4 ++-- core/src/test/scala/org/apache/spark/SparkFunSuite.scala | 4 ++-- scalastyle-config.xml | 4 ++-- .../spark/sql/execution/datasources/CommonFileDataSourceSuite.scala | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/LiteralValueProtoConverterSuite.scala b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/LiteralValueProtoConverterSuite.scala index dc8254c47f3..7c8ee6209ac 100644 --- a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/LiteralValueProtoConverterSuite.scala +++ b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/LiteralValueProtoConverterSuite.scala @@ -17,11 +17,11 @@ package org.apache.spark.sql.connect.planner -import org.scalatest.funsuite.AnyFunSuite +import org.scalatest.funsuite.AnyFunSuite // scalastyle:ignore funsuite import org.apache.spark.sql.connect.planner.LiteralValueProtoConverter.{toCatalystValue, toConnectProtoValue} -class LiteralValueProtoConverterSuite extends AnyFunSuite { +class LiteralValueProtoConverterSuite extends AnyFunSuite { // scalastyle:ignore funsuite test("basic proto value and catalyst value conversion") { val values = Array(null, true, 1.toByte, 1.toShort, 1, 1L, 1.1d, 1.1f, "spark") diff --git a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala index 7a08de9c181..27198039fdb 100644 --- a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala @@ -32,7 +32,7 @@ import org.apache.logging.log4j.core.{LogEvent, Logger, LoggerContext} import org.apache.logging.log4j.core.appender.AbstractAppender import org.apache.logging.log4j.core.config.Property import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, BeforeAndAfterEach, Failed, Outcome} -import org.scalatest.funsuite.AnyFunSuite +import org.scalatest.funsuite.AnyFunSuite // scalastyle:ignore funsuite import org.apache.spark.deploy.LocalSparkCluster import org.apache.spark.internal.Logging @@ -64,7 +64,7 @@ import org.apache.spark.util.{AccumulatorContext, Utils} * } */ abstract class SparkFunSuite - extends AnyFunSuite + extends AnyFunSuite // scalastyle:ignore funsuite with BeforeAndAfterAll with BeforeAndAfterEach with ThreadAudit diff --git a/scalastyle-config.xml b/scalastyle-config.xml index 4e2da275694..f34b5d55e42 100644 --- a/scalastyle-config.xml +++ b/scalastyle-config.xml @@ -135,9 +135,9 @@ This file is divided into 3 sections: <!-- ??? usually shouldn't be checked into the code base. --> <check level="error" class="org.scalastyle.scalariform.NotImplementedErrorUsage" enabled="true"></check> - <!-- As of SPARK-7558, all tests in Spark should extend o.a.s.SparkFunSuite instead of FunSuite directly --> + <!-- As of SPARK-7558, all tests in Spark should extend o.a.s.SparkFunSuite instead of AnyFunSuite directly --> <check customId="funsuite" level="error" class="org.scalastyle.scalariform.TokenChecker" enabled="true"> - <parameters><parameter name="regex">^FunSuite[A-Za-z]*$</parameter></parameters> + <parameters><parameter name="regex">^AnyFunSuite[A-Za-z]*$</parameter></parameters> <customMessage>Tests must extend org.apache.spark.SparkFunSuite instead.</customMessage> </check> diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala index b7d0a7fc306..739f4c440be 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala @@ -17,7 +17,7 @@ package org.apache.spark.sql.execution.datasources -import org.scalatest.funsuite.AnyFunSuite +import org.scalatest.funsuite.AnyFunSuite // scalastyle:ignore funsuite import org.apache.spark.sql.{Dataset, Encoders, FakeFileSystemRequiringDSOption, SparkSession} import org.apache.spark.sql.catalyst.plans.SQLHelper @@ -27,7 +27,8 @@ import org.apache.spark.sql.catalyst.plans.SQLHelper * The tests that are not applicable to all file-based data sources should be placed to * [[org.apache.spark.sql.FileBasedDataSourceSuite]]. */ -trait CommonFileDataSourceSuite extends SQLHelper { self: AnyFunSuite => +trait CommonFileDataSourceSuite extends SQLHelper { + self: AnyFunSuite => // scalastyle:ignore funsuite protected def spark: SparkSession protected def dataSourceFormat: String --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org