From bfba94551d89b5480223e04f2306187f7fb1b6fd Mon Sep 17 00:00:00 2001 From: liangbowen Date: Tue, 22 Nov 2022 21:04:31 +0800 Subject: [PATCH] [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 Signed-off-by: Cheng Pan --- .../engine/spark/operation/PySparkTests.scala | 2 ++ .../org/apache/kyuubi/tags/PySparkTest.java | 29 +++++++++++++++++++ pom.xml | 4 ++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 kyuubi-common/src/test/java/org/apache/kyuubi/tags/PySparkTest.java 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 @@ 4.6.1 3.0.0-M7 2.0.2 - org.scalatest.tags.Slow,org.apache.kyuubi.tags.HudiTest + + org.scalatest.tags.Slow,org.apache.kyuubi.tags.HudiTest,org.apache.kyuubi.tags.PySparkTest + 2.24.1 0.8.7