Skip to content

Commit c84550b

Browse files
authored
Move s3 source integration (#525)
should be able to run `../gradlew integrationTest` from the s3-source directory.
1 parent 6100488 commit c84550b

File tree

21 files changed

+1090
-1769
lines changed

21 files changed

+1090
-1769
lines changed

commons/src/testFixtures/java/io/aiven/kafka/connect/common/integration/source/AbstractOffsetManagerIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import io.aiven.kafka.connect.common.config.KafkaFragment;
3636
import io.aiven.kafka.connect.common.config.SourceConfigFragment;
3737
import io.aiven.kafka.connect.common.config.TransformerFragment;
38-
import io.aiven.kafka.connect.common.integration.KafkaManager;
38+
import io.aiven.commons.kafka.testkit.KafkaManager;
3939
import io.aiven.kafka.connect.common.source.AbstractSourceRecord;
4040
import io.aiven.kafka.connect.common.source.OffsetManager;
4141
import io.aiven.kafka.connect.common.source.input.InputFormat;

commons/src/testFixtures/java/io/aiven/kafka/connect/common/integration/source/AbstractSourceIntegrationBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
import io.aiven.kafka.connect.common.NativeInfo;
4444
import io.aiven.kafka.connect.common.integration.ConsumerPropertiesBuilder;
45-
import io.aiven.kafka.connect.common.integration.KafkaManager;
45+
import io.aiven.commons.kafka.testkit.KafkaManager;
4646
import io.aiven.kafka.connect.common.source.AbstractSourceRecord;
4747
import io.aiven.kafka.connect.common.source.AbstractSourceTask;
4848
import io.aiven.kafka.connect.common.source.OffsetManager;

commons/src/testFixtures/java/io/aiven/kafka/connect/common/integration/source/AbstractSourceIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import io.aiven.kafka.connect.common.format.AvroTestDataFixture;
4848
import io.aiven.kafka.connect.common.format.JsonTestDataFixture;
4949
import io.aiven.kafka.connect.common.format.ParquetTestDataFixture;
50-
import io.aiven.kafka.connect.common.integration.KafkaManager;
50+
import io.aiven.commons.kafka.testkit.KafkaManager;
5151
import io.aiven.kafka.connect.common.source.AbstractSourceRecord;
5252
import io.aiven.kafka.connect.common.source.OffsetManager;
5353
import io.aiven.kafka.connect.common.source.input.InputFormat;

s3-commons/src/main/java/io/aiven/kafka/connect/config/s3/S3ConfigFragment.java

Lines changed: 250 additions & 69 deletions
Large diffs are not rendered by default.

s3-source-connector/build.gradle.kts

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ idea {
6464
}
6565

6666
dependencies {
67-
compileOnly("org.apache.kafka:connect-api:$kafkaVersion")
68-
compileOnly("org.apache.kafka:connect-runtime:$kafkaVersion")
67+
compileOnly(apache.kafka.connect.api)
68+
compileOnly(apache.kafka.connect.runtime)
6969
compileOnly(project(":site"))
70-
compileOnly("org.apache.velocity:velocity-engine-core:2.4.1")
71-
compileOnly("org.apache.velocity.tools:velocity-tools-generic:3.1")
70+
compileOnly(apache.velocity.engine.core)
71+
compileOnly(apache.velocity.tools)
7272

7373
implementation(apache.commons.collection4)
7474
implementation(project(":commons"))
@@ -84,19 +84,27 @@ dependencies {
8484
}
8585

8686
testImplementation(testFixtures(project(":commons")))
87+
testImplementation(testFixtures(project(":s3-commons")))
8788
testImplementation(compressionlibs.snappy)
8889
testImplementation(compressionlibs.zstd.jni)
8990
testImplementation(testinglibs.awaitility)
9091

91-
testImplementation("org.apache.kafka:connect-api:$kafkaVersion")
92-
testImplementation("org.apache.kafka:connect-runtime:$kafkaVersion")
93-
testImplementation("org.apache.kafka:connect-json:$kafkaVersion")
92+
testImplementation(apache.kafka.connect.api)
93+
testImplementation(apache.kafka.connect.runtime)
94+
testImplementation(apache.kafka.connect.json)
95+
96+
testImplementation(testinglibs.localstack) {
97+
exclude(group = "io.netty", module = "netty-transport-native-epoll")
98+
}
99+
testImplementation(testcontainers.junit.jupiter)
100+
testImplementation(testcontainers.kafka) // this is not Kafka version
101+
testImplementation(testcontainers.junit.jupiter)
102+
testImplementation(testcontainers.localstack)
94103

95104
testImplementation(testinglibs.junit.jupiter)
96105
testImplementation(testinglibs.assertj.core)
97106

98107
testImplementation(testinglibs.mockito.core)
99-
testImplementation("io.findify:s3mock_2.11:$s3mockVersion")
100108

101109
testRuntimeOnly(testinglibs.junit.jupiter.engine)
102110
testImplementation(testinglibs.mockito.junit.jupiter)
@@ -146,10 +154,13 @@ dependencies {
146154
integrationTestImplementation(testcontainers.kafka) // this is not Kafka version
147155
integrationTestImplementation(testcontainers.localstack)
148156
integrationTestImplementation(testinglibs.wiremock)
157+
integrationTestImplementation(testFixtures(project(":s3-commons")))
158+
integrationTestImplementation(testcontainers.localstack)
149159

150160
integrationTestImplementation(confluent.kafka.connect.avro.converter) {
151161
exclude(group = "org.apache.kafka", module = "kafka-clients")
152162
}
163+
integrationTestImplementation(apache.kafka.connect.api)
153164

154165
testImplementation(apache.hadoop.mapreduce.client.core) {
155166
exclude(group = "org.apache.hadoop", module = "hadoop-yarn-client")
@@ -189,16 +200,31 @@ dependencies {
189200
exclude(group = "io.netty", module = "netty")
190201
}
191202

192-
integrationTestImplementation("org.apache.kafka:connect-runtime:${kafkaVersion}:test")
193-
integrationTestImplementation("org.apache.kafka:connect-runtime:${kafkaVersion}")
194-
integrationTestImplementation("org.apache.kafka:kafka-clients:${kafkaVersion}:test")
195-
integrationTestImplementation("org.apache.kafka:kafka_2.13:${kafkaVersion}:test")
196-
integrationTestImplementation("org.apache.kafka:kafka_2.13:${kafkaVersion}")
203+
integrationTestImplementation(apache.kafka.connect.runtime)
204+
integrationTestImplementation(apache.kafka.clients)
197205
integrationTestImplementation(testFixtures(project(":commons")))
206+
integrationTestImplementation(testFixtures(project(":s3-source-connector")))
198207

199208
// Make test utils from 'test' available in 'integration-test'
200209
integrationTestImplementation(sourceSets["test"].output)
201210
integrationTestImplementation(testinglibs.awaitility)
211+
212+
testFixturesImplementation(amazonawssdk.s3)
213+
testFixturesImplementation(amazonawssdk.sts)
214+
testFixturesImplementation(testFixtures(project(":commons")))
215+
testFixturesImplementation(project(":s3-commons"))
216+
testFixturesImplementation(testinglibs.localstack) {
217+
exclude(group = "io.netty", module = "netty-transport-native-epoll")
218+
}
219+
testFixturesImplementation(testcontainers.junit.jupiter)
220+
testFixturesImplementation(testcontainers.localstack)
221+
testFixturesImplementation(testinglibs.junit.jupiter)
222+
testFixturesImplementation(testinglibs.assertj.core)
223+
testFixturesImplementation(compressionlibs.snappy)
224+
testFixturesImplementation(compressionlibs.zstd.jni)
225+
testFixturesImplementation(tools.spotbugs.annotations)
226+
testFixturesImplementation(apache.kafka.connect.api)
227+
testFixturesImplementation(apache.commons.io)
202228
}
203229

204230
tasks.named<Pmd>("pmdIntegrationTest") {
@@ -258,7 +284,7 @@ publishing {
258284
licenses {
259285
license {
260286
name = "Apache 2.0"
261-
url = "http://www.apache.org/licenses/LICENSE-2.0"
287+
url = "https://www.apache.org/licenses/LICENSE-2.0"
262288
distribution = "repo"
263289
}
264290
}

0 commit comments

Comments
 (0)