Skip to content

Commit

Permalink
Merge pull request #5 from trocco-io/feature/fix-integration-test
Browse files Browse the repository at this point in the history
Fix gradlew test errors and improve tests.
  • Loading branch information
NamedPython authored Aug 13, 2024
2 parents 61cecf3 + d97f75d commit 6252b2e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ dependencies {
exclude group: "com.fasterxml.jackson.datatype", module: "jackson-datatype-jdk8"
exclude group: "javax.validation", module: "validation-api"
}

// Supress following logs in gradlew test.
// SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
// SLF4J: Defaulting to no-operation (NOP) logger implementation
// SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
testImplementation("org.slf4j:slf4j-simple:1.7.30")
}
embulkPlugin {
mainClass = "org.embulk.output.DatabricksOutputPlugin"
Expand Down Expand Up @@ -99,6 +105,9 @@ gem {
homepage = "https://github.com/trocco-io/embulk-output-databricks"
licenses = [ "MIT" ]
}
test {
maxParallelForks 1
}
spotless {
java {
importOrder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public static String fetchCurrentTransactionVolumeName(String prefix) {
return currentTransactionVolumeName;
}

public static void resetFetchCurrentTransactionVolumeName() {
currentTransactionVolumeName = null;
}

public static String createRandomUnityCatalogObjectName() {
// https://docs.databricks.com/en/sql/language-manual/sql-ref-names.html
// https://docs.databricks.com/en/sql/language-manual/sql-ref-identifiers.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void setup() {
return;
}
ConnectionUtil.dropAllTemporaryTables();
DatabricksAPIClient.resetFetchCurrentTransactionVolumeName();
DatabricksApiClientUtil.deleteAllTemporaryStagingVolumes();
}

Expand Down

0 comments on commit 6252b2e

Please sign in to comment.