Skip to content

Commit

Permalink
source-db2: adopt CDK 0.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Feb 13, 2024
1 parent fa66dc8 commit f6be8d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
19 changes: 2 additions & 17 deletions airbyte-integrations/connectors/source-db2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
plugins {
id 'application'
id 'airbyte-java-connector'
}

airbyteJavaConnector {
cdkVersionRequired = '0.13.2'
cdkVersionRequired = '0.20.4'
features = ['db-sources']
useLocalCdk = false
}

//remove once upgrading the CDK version to 0.4.x or later
java {
compileTestJava {
options.compilerArgs.remove("-Werror")
}
compileJava {
options.compilerArgs.remove("-Werror")
}
}

airbyteJavaConnector.addCdkDependencies()

application {
mainClass = 'io.airbyte.integrations.source.db2.Db2Source'
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
Expand All @@ -30,7 +17,5 @@ dependencies {

implementation group: 'com.ibm.db2', name: 'jcc', version: '11.5.5.0'

testImplementation libs.testcontainers.db2

integrationTestJavaImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'org.testcontainers:db2:1.19.4'
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public Set<String> getExcludedInternalNameSpaces() {
}

@Override
@SuppressWarnings("unchecked")
public Set<JdbcPrivilegeDto> getPrivilegesTableForCurrentUser(final JdbcDatabase database, final String schema) throws SQLException {
try (final Stream<JsonNode> stream = database.unsafeQuery(getPrivileges(), sourceOperations::rowToJson)) {
return stream.map(this::getPrivilegeDto).collect(Collectors.toSet());
Expand Down Expand Up @@ -170,7 +171,7 @@ private static void convertAndImportCertificate(final String certificate, final
}

private static void runProcess(final String cmd, final Runtime run) throws IOException, InterruptedException {
final Process pr = run.exec(cmd);
final Process pr = run.exec(cmd.split(" "));
if (!pr.waitFor(30, TimeUnit.SECONDS)) {
pr.destroy();
throw new RuntimeException("Timeout while executing: " + cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ protected JsonNode getConfig() throws Exception {

@Override
protected void tearDown(final TestDestinationEnv testEnv) {
dslContext.close();
container.close();
}

Expand Down

0 comments on commit f6be8d7

Please sign in to comment.