Skip to content

java-cdk: move log4j2-test.xml to test fixtures #36021

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ dependencies {
implementation project(':airbyte-cdk:java:airbyte-cdk:core')

implementation 'com.azure:azure-storage-blob:12.12.0'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dependencies {

api 'com.google.cloud:google-cloud-bigquery:2.37.0'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
}
2 changes: 2 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/datastore-mongo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ dependencies {

api 'org.mongodb:mongodb-driver-sync:4.10.2'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))

testFixturesApi 'org.testcontainers:mongodb:1.19.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ dependencies {

api 'org.postgresql:postgresql:42.6.0'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))

testFixturesApi 'org.testcontainers:postgresql:1.19.0'
}
6 changes: 3 additions & 3 deletions airbyte-cdk/java/airbyte-cdk/db-destinations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ dependencies {

implementation 'io.aesy:datasize:1.0.0'

testImplementation project(':airbyte-cdk:java:airbyte-cdk:typing-deduping')

testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:dependencies')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:dependencies'))
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:core')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:typing-deduping')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:typing-deduping'))

testImplementation project(':airbyte-cdk:java:airbyte-cdk:typing-deduping')
}
4 changes: 1 addition & 3 deletions airbyte-cdk/java/airbyte-cdk/db-sources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ dependencies {
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:dependencies')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:dependencies'))
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:core')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))

testFixturesImplementation 'net.sourceforge.argparse4j:argparse4j:0.9.0'
testFixturesImplementation 'io.swagger:swagger-annotations:1.6.13'
testFixturesImplementation 'org.hamcrest:hamcrest-all:1.3'
testFixturesImplementation 'org.junit.platform:junit-platform-launcher:1.10.1'


testImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testImplementation project(':airbyte-cdk:java:airbyte-cdk:datastore-postgres')
testImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:datastore-postgres'))

Expand Down
2 changes: 2 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ dependencies {
implementation 'me.andrz.jackson:jackson-json-reference-core:0.3.2' // needed so that we can follow $ref when parsing json
implementation 'org.openapitools:jackson-databind-nullable:0.2.1'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))

testFixturesImplementation 'io.swagger:swagger-annotations:1.6.2'
testFixturesImplementation 'org.apache.ant:ant:1.10.11'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ public static JsonNode deserializeExact(final String jsonString) {
}
}

public static JsonNode deserialize(final byte[] jsonBytes) {
try {
return OBJECT_MAPPER.readTree(jsonBytes);
} catch (final IOException e) {
throw new RuntimeException(e);
}
}

public static JsonNode deserializeExact(final byte[] jsonBytes) {
try {
return OBJECT_MAPPER_EXACT.readTree(jsonBytes);
} catch (final IOException e) {
throw new RuntimeException(e);
}
}

public static <T> Optional<T> tryDeserialize(final String jsonString, final Class<T> klass) {
try {
return Optional.of(OBJECT_MAPPER.readValue(jsonString, klass));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {

api 'com.google.cloud:google-cloud-storage:2.32.1'

testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:s3-destinations')
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:s3-destinations'))
}
4 changes: 2 additions & 2 deletions airbyte-cdk/java/airbyte-cdk/s3-destinations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ dependencies {
api 'org.apache.parquet:parquet-avro:1.13.1'
runtimeOnly 'com.hadoop.gplcompression:hadoop-lzo:0.4.20'

testImplementation 'org.mockito:mockito-inline:5.2.0'

testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:dependencies')
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:dependencies'))
testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:core')
Expand All @@ -40,4 +38,6 @@ dependencies {
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:typing-deduping'))
testFixturesApi project(':airbyte-cdk:java:airbyte-cdk:db-destinations')
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:db-destinations'))

testImplementation 'org.mockito:mockito-inline:5.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ dependencies {
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:dependencies')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:dependencies'))
testFixturesImplementation project(':airbyte-cdk:java:airbyte-cdk:core')
testFixturesImplementation testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
testFixturesApi testFixtures(project(':airbyte-cdk:java:airbyte-cdk:core'))
}
Loading