-
Notifications
You must be signed in to change notification settings - Fork 29k
[WIP] Move ClientE2ETestSuite into a separate module #39788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ 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. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-parent_2.12</artifactId> | ||
| <version>3.5.0-SNAPSHOT</version> | ||
| <relativePath>../../../../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>spark-connect-client-integration-tests_2.12</artifactId> | ||
| <packaging>jar</packaging> | ||
| <name>Spark Project Connect Client Integration Tests</name> | ||
| <url>https://spark.apache.org/</url> | ||
| <properties> | ||
| <sbt.project.name>connect-client-integration-tests</sbt.project.name> | ||
| <guava.version>31.0.1-jre</guava.version> | ||
| <protobuf.version>3.21.12</protobuf.version> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <!-- | ||
| <dependency> | ||
| <groupId>com.google.protobuf</groupId> | ||
| <artifactId>protobuf-java</artifactId> | ||
| <version>${protobuf.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| --> | ||
| <!-- | ||
| <dependency> | ||
| <groupId>com.google.guava</groupId> | ||
| <artifactId>guava</artifactId> | ||
| <version>${guava.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| --> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-connect-client-jvm_${scala.binary.version}</artifactId> | ||
| <version>${project.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-connect-client-jvm_${scala.binary.version}</artifactId> | ||
| <version>${project.version}</version> | ||
| <type>test-jar</type> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-catalyst_${scala.binary.version}</artifactId> | ||
| <scope>test</scope> | ||
| <version>${project.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-repl_${scala.binary.version}</artifactId> | ||
| <version>${project.version}</version> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-sql_${scala.binary.version}</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-connect-common_${scala.binary.version}</artifactId> | ||
| <scope>test</scope> | ||
| <version>${project.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-connect_${scala.binary.version}</artifactId> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be |
||
| <version>${project.version}</version> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>org.apache.spark</groupId> | ||
| <artifactId>spark-sql_${scala.binary.version}</artifactId> | ||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
| </dependencies> | ||
| <build> | ||
| <testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory> | ||
| </build> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # | ||
| # 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. | ||
| # | ||
|
|
||
| # Set everything to be logged to the file target/unit-tests.log | ||
| rootLogger.level = info | ||
| rootLogger.appenderRef.file.ref = ${sys:test.appender:-File} | ||
|
|
||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex | ||
|
|
||
| # Tests that launch java subprocesses can set the "test.appender" system property to | ||
| # "console" to avoid having the child process's logs overwrite the unit test's | ||
| # log file. | ||
| appender.console.type = Console | ||
| appender.console.name = console | ||
| appender.console.target = SYSTEM_ERR | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %t: %m%n%ex | ||
|
|
||
| # Ignore messages below warning level from Jetty, because it's a bit verbose | ||
| logger.jetty.name = org.sparkproject.jetty | ||
| logger.jetty.level = warn |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,13 +55,14 @@ object BuildCommons { | |
| val connectCommon = ProjectRef(buildLocation, "connect-common") | ||
| val connect = ProjectRef(buildLocation, "connect") | ||
| val connectClient = ProjectRef(buildLocation, "connect-client-jvm") | ||
| val connectClientTests = ProjectRef(buildLocation, "connect-client-integration-tests") | ||
|
|
||
| val allProjects@Seq( | ||
| core, graphx, mllib, mllibLocal, repl, networkCommon, networkShuffle, launcher, unsafe, tags, sketch, kvstore, _* | ||
| ) = Seq( | ||
| "core", "graphx", "mllib", "mllib-local", "repl", "network-common", "network-shuffle", "launcher", "unsafe", | ||
| "tags", "sketch", "kvstore" | ||
| ).map(ProjectRef(buildLocation, _)) ++ sqlProjects ++ streamingProjects ++ Seq(connectCommon, connect, connectClient) | ||
| ).map(ProjectRef(buildLocation, _)) ++ sqlProjects ++ streamingProjects ++ Seq(connectCommon, connect, connectClient, connectClientTests) | ||
|
|
||
| val optionallyEnabledProjects@Seq(kubernetes, mesos, yarn, | ||
| sparkGangliaLgpl, streamingKinesisAsl, | ||
|
|
@@ -403,7 +404,8 @@ object SparkBuild extends PomBuild { | |
| val mimaProjects = allProjects.filterNot { x => | ||
| Seq( | ||
| spark, hive, hiveThriftServer, repl, networkCommon, networkShuffle, networkYarn, | ||
| unsafe, tags, tokenProviderKafka010, sqlKafka010, connectCommon, connect, connectClient, protobuf | ||
| unsafe, tags, tokenProviderKafka010, sqlKafka010, connectCommon, connect, connectClient, | ||
| connectClientTests, protobuf | ||
| ).contains(x) | ||
| } | ||
|
|
||
|
|
@@ -447,6 +449,7 @@ object SparkBuild extends PomBuild { | |
| enable(SparkConnectCommon.settings)(connectCommon) | ||
| enable(SparkConnect.settings)(connect) | ||
| enable(SparkConnectClient.settings)(connectClient) | ||
| enable(SparkConnectClientTests.settings)(connectClientTests) | ||
|
|
||
| /* Protobuf settings */ | ||
| enable(SparkProtobuf.settings)(protobuf) | ||
|
|
@@ -870,6 +873,7 @@ object SparkConnectClient { | |
| }, | ||
|
|
||
| (assembly / assemblyShadeRules) := Seq( | ||
| ShadeRule.rename("io.grpc.**" -> "org.sparkproject.connect.grpc.@0").inAll, | ||
| ShadeRule.rename("com.google.protobuf.**" -> "org.sparkproject.connect.protobuf.@1").inAll, | ||
| ShadeRule.rename("com.google.common.**" -> "org.sparkproject.connect.client.guava.@1").inAll, | ||
| ShadeRule.rename("com.google.thirdparty.**" -> "org.sparkproject.connect.client.guava.@1").inAll, | ||
|
|
@@ -891,6 +895,30 @@ object SparkConnectClient { | |
| } | ||
| } | ||
|
|
||
| object SparkConnectClientTests { | ||
| lazy val settings = Seq( | ||
| excludeDependencies ++= { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I can't solve it temporarily |
||
| val scalaBinaryVersion = | ||
| SbtPomKeys.effectivePom.value.getProperties.get("scala.binary.version").asInstanceOf[String] | ||
| Seq( | ||
| ExclusionRule("org.apache.spark", s"spark-sql_${scalaBinaryVersion}") | ||
| ) | ||
| }, | ||
| libraryDependencies ++= { | ||
| val guavaVersion = | ||
| SbtPomKeys.effectivePom.value.getProperties.get("guava.version").asInstanceOf[String] | ||
| Seq("com.google.guava" % "guava" % guavaVersion) | ||
| }, | ||
| dependencyOverrides ++= { | ||
| val guavaVersion = | ||
| SbtPomKeys.effectivePom.value.getProperties.get("guava.version").asInstanceOf[String] | ||
| Seq( | ||
| "com.google.guava" % "guava" % guavaVersion | ||
| ) | ||
| } | ||
| ) | ||
| } | ||
|
|
||
| object SparkProtobuf { | ||
| import BuildCommons.protoVersion | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be
<scope>test</scope>