You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/11/22 13:04:42 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3805] Skip PySpark tests for nightly builds

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

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new bfba94551 [KYUUBI #3805] Skip PySpark tests for nightly builds
bfba94551 is described below

commit bfba94551d89b5480223e04f2306187f7fb1b6fd
Author: liangbowen <li...@gf.com.cn>
AuthorDate: Tue Nov 22 21:04:31 2022 +0800

    [KYUUBI #3805] Skip PySpark tests for nightly builds
    
    ### _Why are the changes needed?_
    
    to close #3805 .
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3832 from bowenliang123/skip-pyspark-tests.
    
    Closes #3805
    
    02a59bfb [liangbowen] add maven.plugin.scalatest.exclude.tags=org.scalatest.tags.PySparkTest to pom instead
    444b6f4e [liangbowen] introduce @PySparkTest annotation and skip PySparkTests for nightly builds
    
    Authored-by: liangbowen <li...@gf.com.cn>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../engine/spark/operation/PySparkTests.scala      |  2 ++
 .../java/org/apache/kyuubi/tags/PySparkTest.java   | 29 ++++++++++++++++++++++
 pom.xml                                            |  4 ++-
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/PySparkTests.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/PySparkTests.scala
index c11705a99..1e8920755 100644
--- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/PySparkTests.scala
+++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/operation/PySparkTests.scala
@@ -24,7 +24,9 @@ import scala.sys.process._
 
 import org.apache.kyuubi.engine.spark.WithSparkSQLEngine
 import org.apache.kyuubi.operation.HiveJDBCTestHelper
+import org.apache.kyuubi.tags.PySparkTest
 
+@PySparkTest
 trait PySparkTests extends WithSparkSQLEngine with HiveJDBCTestHelper {
 
   test("pyspark support") {
diff --git a/kyuubi-common/src/test/java/org/apache/kyuubi/tags/PySparkTest.java b/kyuubi-common/src/test/java/org/apache/kyuubi/tags/PySparkTest.java
new file mode 100644
index 000000000..1b7aa97b4
--- /dev/null
+++ b/kyuubi-common/src/test/java/org/apache/kyuubi/tags/PySparkTest.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tags;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import org.scalatest.TagAnnotation;
+
+@TagAnnotation
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.TYPE})
+public @interface PySparkTest {}
diff --git a/pom.xml b/pom.xml
index d7e416dc2..5ca10e905 100644
--- a/pom.xml
+++ b/pom.xml
@@ -206,7 +206,9 @@
         <maven.plugin.scala.version>4.6.1</maven.plugin.scala.version>
         <maven.plugin.surefire.version>3.0.0-M7</maven.plugin.surefire.version>
         <maven.plugin.scalatest.version>2.0.2</maven.plugin.scalatest.version>
-        <maven.plugin.scalatest.exclude.tags>org.scalatest.tags.Slow,org.apache.kyuubi.tags.HudiTest</maven.plugin.scalatest.exclude.tags>
+        <maven.plugin.scalatest.exclude.tags>
+            org.scalatest.tags.Slow,org.apache.kyuubi.tags.HudiTest,org.apache.kyuubi.tags.PySparkTest
+        </maven.plugin.scalatest.exclude.tags>
         <maven.plugin.scalatest.include.tags></maven.plugin.scalatest.include.tags>
         <maven.plugin.spotless.version>2.24.1</maven.plugin.spotless.version>
         <maven.plugin.jacoco.version>0.8.7</maven.plugin.jacoco.version>