You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2023/03/08 04:46:58 UTC

[spark] branch branch-3.4 updated: [SPARK-42700][BUILD] Add `h2` as test dependency of connect-server module

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

gurwls223 pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new 3a29be4fe0c [SPARK-42700][BUILD] Add `h2` as test dependency of connect-server module
3a29be4fe0c is described below

commit 3a29be4fe0cca15eea05312876d8bea82c1ddb42
Author: yangjie01 <ya...@baidu.com>
AuthorDate: Wed Mar 8 13:46:33 2023 +0900

    [SPARK-42700][BUILD] Add `h2` as test dependency of connect-server module
    
    ### What changes were proposed in this pull request?
    Run the following commands
    
    ```
    build/mvn clean install -DskipTests -pl connector/connect/server -am
    build/mvn test -pl connector/connect/server
    ```
    
    then we can see the following error message due to [SPARK-42555](https://issues.apache.org/jira/browse/SPARK-42555) A adds the loading `org.h2.Driver` in `beforeAll` of `ProtoToParsedPlanTestSuite`, but
    
    ```
    ProtoToParsedPlanTestSuite:
    *** RUN ABORTED ***
      java.lang.ClassNotFoundException: org.h2.Driver
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:398)
      at org.apache.spark.util.Utils$.classForName(Utils.scala:225)
      at org.apache.spark.sql.connect.ProtoToParsedPlanTestSuite.beforeAll(ProtoToParsedPlanTestSuite.scala:68)
      at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:212)
      at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
      at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
      ...
    ```
    
    So this pr add `h2` as test dependency of connect-server module to make maven test pass.
    
    ### Why are the changes needed?
    Add `h2` as test dependency of connect-server module to make maven test pass.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    manual checkļ¼š
    ```
    build/mvn clean install -DskipTests -pl connector/connect/server -am
    build/mvn test -pl connector/connect/server
    ```
    with this pr, all test passed
    
    Closes #40317 from LuciferYang/SPARK-42700.
    
    Authored-by: yangjie01 <ya...@baidu.com>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
    (cherry picked from commit aa8b41c94d6042a05e304f4265788a96446ca9d2)
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 connector/connect/server/pom.xml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/connector/connect/server/pom.xml b/connector/connect/server/pom.xml
index 48afdf6b987..a2aff8f9f31 100644
--- a/connector/connect/server/pom.xml
+++ b/connector/connect/server/pom.xml
@@ -209,7 +209,12 @@
       <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
-
+    <dependency>
+      <groupId>com.h2database</groupId>
+      <artifactId>h2</artifactId>
+      <version>2.1.214</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org