Skip to content

Commit

Permalink
find class h2 driver
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Sep 23, 2024
1 parent df12196 commit b7675dc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
1 change: 0 additions & 1 deletion authorizations/authorization-ranger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ dependencies {
testImplementation(project(":catalogs:catalog-common"))
testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(libs.mockito.core)
testImplementation(libs.h2db)
testImplementation(libs.mysql.driver)
testImplementation(libs.postgresql.driver)
testImplementation("org.apache.spark:spark-hive_$scalaVersion:$sparkVersion")
Expand Down
3 changes: 1 addition & 2 deletions catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ dependencies {
implementation(libs.slf4j.api)

testImplementation(project(":integration-test-common", "testArtifacts"))

testImplementation(libs.bundles.metrics)
testImplementation(libs.minikdc)
testImplementation(libs.hadoop3.minicluster)

testImplementation(libs.bundles.log4j)
testImplementation(libs.mockito.core)
testImplementation(libs.mockito.inline)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public String startH2Database(Config config) {

String connectionUrl = constructH2URI(originalJDBCUrl, storagePath);

try {
Class.forName("org.h2.Driver");
} catch (ClassNotFoundException e) {
throw new RuntimeException("Failed to load H2 driver.", e);
}

try (Connection connection = DriverManager.getConnection(connectionUrl, username, password);
Statement statement = connection.createStatement()) {
String sqlContent =
Expand Down
1 change: 1 addition & 0 deletions integration-test-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies {
exclude("com.amazonaws", "aws-java-sdk-bundle")
}
testImplementation(libs.apiguardian.api)
testImplementation(libs.bundles.metrics)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.engine)
Expand Down
8 changes: 8 additions & 0 deletions spark-connector/v3.3/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}
Expand Down
8 changes: 8 additions & 0 deletions spark-connector/v3.4/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}
Expand Down
10 changes: 8 additions & 2 deletions spark-connector/v3.5/spark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ dependencies {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
testImplementation(project(":server")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":server-common")) {
exclude("org.apache.logging.log4j")
exclude("org.slf4j")
}
testImplementation(project(":spark-connector:spark-common", "testArtifacts")) {
exclude("com.fasterxml.jackson")
}

testImplementation(libs.hive2.common) {
exclude("com.sun.jersey")
Expand Down

0 comments on commit b7675dc

Please sign in to comment.