LuciferYang commented on code in PR #53106:
URL: https://github.com/apache/spark/pull/53106#discussion_r2536355831
##########
sql/connect/server/src/test/scala/org/apache/spark/sql/connect/pipelines/PythonPipelineSuite.scala:
##########
@@ -1111,4 +1104,13 @@ class PythonPipelineSuite
| return spark.range(5)
|""".stripMargin)
}
+
+ override protected def test(testName: String, testTags: Tag*)(testFun: =>
Any)(implicit
+ pos: Position): Unit = {
+ if (PythonTestDepsChecker.isConnectDepsAvailable) {
Review Comment:
I tried the following modification methods:
```scala
override protected def test(testName: String, testTags: Tag*)(testFun: =>
Any)(implicit
pos: Position): Unit = {
assume(PythonTestDepsChecker.isConnectDepsAvailable)
super.test(testName, testTags: _*)(testFun)
}
```
then run `build/sbt clean "connect/testOnly
org.apache.spark.sql.connect.pipelines.PythonPipelineSuite"` but failed:
```
[info] PythonPipelineSuite:
[info] org.apache.spark.sql.connect.pipelines.PythonPipelineSuite ***
ABORTED *** (9 milliseconds)
[info]
org.apache.spark.sql.connect.PythonTestDepsChecker.isConnectDepsAvailable was
false (PythonPipelineSuite.scala:121)
[info] org.scalatest.exceptions.TestCanceledException:
[info] at
org.scalatest.Assertions.newTestCanceledException(Assertions.scala:475)
[info] at
org.scalatest.Assertions.newTestCanceledException$(Assertions.scala:474)
[info] at
org.scalatest.Assertions$.newTestCanceledException(Assertions.scala:1231)
[info] at
org.scalatest.Assertions$AssertionsHelper.macroAssume(Assertions.scala:1310)
[info] at
org.apache.spark.sql.connect.pipelines.PythonPipelineSuite.test(PythonPipelineSuite.scala:1110)
[info] at
org.apache.spark.sql.connect.pipelines.PythonPipelineSuite.<init>(PythonPipelineSuite.scala:121)
[info] at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
[info] at
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[info] at
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[info] at
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
[info] at
java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
[info] at
java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
[info] at java.base/java.lang.Class.newInstance(Class.java:645)
[info] at
org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:454)
[info] at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:414)
[info] at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[info] at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[info] at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[info] at java.base/java.lang.Thread.run(Thread.java:840)
[info] Run completed in 1 second, 500 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 1
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] *** 1 SUITE ABORTED ***
[error] Error during tests:
[error] org.apache.spark.sql.connect.pipelines.PythonPipelineSuite
[error] (connect / Test / testOnly) sbt.TestsFailedException: Tests
unsuccessful
```
It seems that `assume` cannot be used directly. @sryza
--
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]