1919
2020String sparkMajorVersion = ' 3.5'
2121String scalaVersion = System . getProperty(" scalaVersion" ) != null ? System . getProperty(" scalaVersion" ) : System . getProperty(" defaultScalaVersion" )
22- String openHouseFixturesCoordinate = gradle. startParameter. systemPropertiesArgs. get(" openhouseFixturesCoordinate" )
23- if (openHouseFixturesCoordinate != null ) {
24- // The OpenHouse fixture is published as an executable Spring Boot jar by default. When consumers
25- // use it as a library we need the "-lib" (a.k.a. "uber") classifier that exposes the plain class
26- // files on the classpath. Automatically add the classifier when the caller only provides
27- // the typical groupId:artifactId:version coordinate.
28- int colonCount = openHouseFixturesCoordinate. count(" :" )
29- if (colonCount == 2 ) {
30- openHouseFixturesCoordinate = openHouseFixturesCoordinate + " :uber"
31- }
32- }
33-
34- def sparkSessionProviderValue =
35- gradle. startParameter. systemPropertiesArgs. get(" iceberg.test.spark.session.provider" )
36- def catalogProviderValue =
37- gradle. startParameter. systemPropertiesArgs. get(" iceberg.test.catalog.provider" )
38-
39- def skipDefaultCatalogsValue =
40- gradle. startParameter. systemPropertiesArgs. get(" iceberg.test.catalog.skip.defaults" )
41-
42- if (openHouseFixturesCoordinate != null ) {
43- if (sparkSessionProviderValue == null || sparkSessionProviderValue. isEmpty()) {
44- sparkSessionProviderValue = ' org.apache.iceberg.spark.openhouse.OpenHouseSparkITestProvider'
45- }
46- if (catalogProviderValue == null || catalogProviderValue. isEmpty()) {
47- catalogProviderValue = ' org.apache.iceberg.spark.openhouse.OpenHouseSparkITestProvider'
48- }
49- if (skipDefaultCatalogsValue == null || skipDefaultCatalogsValue. isEmpty()) {
50- skipDefaultCatalogsValue = ' true'
51- }
52- }
5322
5423def sparkProjects = [
5524 project(" :iceberg-spark:iceberg-spark-${ sparkMajorVersion} _${ scalaVersion} " ),
@@ -147,21 +116,8 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") {
147116 testImplementation libs. sqlite. jdbc
148117 testImplementation libs. awaitility
149118
150- if (openHouseFixturesCoordinate != null ) {
151- testRuntimeOnly(openHouseFixturesCoordinate) {
152- exclude group : ' org.apache.iceberg'
153- exclude group : ' com.linkedin.iceberg'
154- exclude group : ' org.apache.logging.log4j' , module : ' log4j-slf4j2-impl'
155- exclude group : ' org.apache.logging.log4j' , module : ' log4j-to-slf4j'
156- exclude group : ' com.fasterxml.jackson.core'
157- exclude group : ' com.fasterxml.jackson.module'
158- exclude group : ' com.fasterxml.jackson.datatype'
159- exclude group : ' com.fasterxml.jackson.dataformat'
160- }
161- testRuntimeOnly project(' :iceberg-aws' )
162- testRuntimeOnly ' com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.4'
163- }
164-
119+ // OpenHouse compatibility testing dependencies - uber jar with transitive=false
120+ // avoids classpath conflicts since the jar is self-contained with shaded dependencies
165121 openhouseCompatibilityRuntime(rootProject. openHouseCompatibilityCoordinate) {
166122 transitive = false
167123 }
@@ -171,32 +127,13 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") {
171127 openhouseCompatibilityRuntime ' com.zaxxer:HikariCP:4.0.3'
172128 }
173129
174- if (openHouseFixturesCoordinate != null ) {
175- configurations {
176- testRuntimeClasspath {
177- exclude group : ' org.apache.logging.log4j' , module : ' log4j-slf4j2-impl'
178- }
179- }
180- }
181-
182130 test {
183131 useJUnitPlatform()
184132 }
185133
186134 tasks. withType(Test ). configureEach {
187135 // Vectorized reads need more memory
188136 maxHeapSize ' 2560m'
189-
190- if (sparkSessionProviderValue != null && ! sparkSessionProviderValue. isEmpty()) {
191- systemProperty " iceberg.test.spark.session.provider" , sparkSessionProviderValue
192- }
193-
194- if (catalogProviderValue != null && ! catalogProviderValue. isEmpty()) {
195- systemProperty " iceberg.test.catalog.provider" , catalogProviderValue
196- }
197- if (skipDefaultCatalogsValue != null && ! skipDefaultCatalogsValue. isEmpty()) {
198- systemProperty " iceberg.test.catalog.skip.defaults" , skipDefaultCatalogsValue
199- }
200137 }
201138
202139 apply from : " $projectDir /../../openhouse.gradle"
@@ -300,12 +237,6 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
300237 exclude group : ' org.scala-lang'
301238 exclude group : ' org.scala-lang.modules'
302239 }
303-
304- integrationImplementation {
305- // Log4j routing is handled via slf4j-simple/log4j-to-slf4j. Drop Spark's slf4j2 bridge to
306- // avoid Log4j enforcing mutual exclusivity at runtime.
307- exclude group : ' org.apache.logging.log4j' , module : ' log4j-slf4j2-impl'
308- }
309240 }
310241
311242 dependencies {
@@ -338,15 +269,6 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
338269 integrationImplementation project(path : ' :iceberg-hive-metastore' , configuration : ' testArtifacts' )
339270 integrationImplementation project(path : " :iceberg-spark:iceberg-spark-${ sparkMajorVersion} _${ scalaVersion} " , configuration : ' testArtifacts' )
340271 integrationImplementation project(path : " :iceberg-spark:iceberg-spark-extensions-${ sparkMajorVersion} _${ scalaVersion} " , configuration : ' testArtifacts' )
341- if (openHouseFixturesCoordinate != null ) {
342- integrationImplementation(openHouseFixturesCoordinate) {
343- // The fixtures already include Iceberg bits transitively; drop them to avoid conflicts
344- exclude group : ' org.apache.iceberg'
345- exclude group : ' com.linkedin.iceberg'
346- // Avoid conflicting SLF4J bridges; Iceberg already routes logging through log4j-to-slf4j
347- exclude group : ' org.apache.logging.log4j' , module : ' log4j-slf4j2-impl'
348- }
349- }
350272 // Not allowed on our classpath, only the runtime jar is allowed
351273 integrationCompileOnly project(" :iceberg-spark:iceberg-spark-extensions-${ sparkMajorVersion} _${ scalaVersion} " )
352274 integrationCompileOnly project(" :iceberg-spark:iceberg-spark-${ sparkMajorVersion} _${ scalaVersion} " )
@@ -394,7 +316,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
394316 description = " Test Spark3 Runtime Jar against Spark ${ sparkMajorVersion} "
395317 group = " verification"
396318 if (project. hasProperty(' extraJvmArgs' )) {
397- jvmArgs + = project. property(' extraJvmArgs' )
319+ jvmArgs + = project. property(' extraJvmArgs' )
398320 }
399321 testClassesDirs = sourceSets. integration. output. classesDirs
400322 classpath = sourceSets. integration. runtimeClasspath + files(shadowJar. archiveFile. get(). asFile. path)
@@ -403,19 +325,6 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
403325 integrationTest. dependsOn shadowJar
404326 check. dependsOn integrationTest
405327
406- tasks. withType(Test ). configureEach {
407- if (sparkSessionProviderValue != null && ! sparkSessionProviderValue. isEmpty()) {
408- systemProperty " iceberg.test.spark.session.provider" , sparkSessionProviderValue
409- }
410-
411- if (catalogProviderValue != null && ! catalogProviderValue. isEmpty()) {
412- systemProperty " iceberg.test.catalog.provider" , catalogProviderValue
413- }
414- if (skipDefaultCatalogsValue != null && ! skipDefaultCatalogsValue. isEmpty()) {
415- systemProperty " iceberg.test.catalog.skip.defaults" , skipDefaultCatalogsValue
416- }
417- }
418-
419328 jar {
420329 enabled = false
421330 }
0 commit comments