Skip to content

Commit

Permalink
WIP - kafka IT-tests moved to separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed Dec 20, 2023
1 parent f0311b9 commit 0095faa
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
jvm: ${{ matrix.jvmName }}

- name: Run all integration tests with default Scala and Java ${{ matrix.jdkVersion }}
run: sbt "akka-projection-kafka-tests/It/test" ${{ matrix.extraOpts }}
run: sbt "akka-projection-kafka-integration/test" ${{ matrix.extraOpts }}
env: # Disable Ryuk resource reaper since we always spin up fresh VMs
TESTCONTAINERS_RYUK_DISABLED: true

Expand Down
28 changes: 14 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,19 @@ lazy val eventsourced =
// provides offset storage backed by Kafka managed offset commits
lazy val kafka =
Project(id = "akka-projection-kafka", base = file("akka-projection-kafka"))
.configs(IntegrationTest)
.settings(Dependencies.kafka)
.settings(Scala3.settings)
.dependsOn(testkit)
.dependsOn(core)
.disablePlugins(CiReleasePlugin)

// separated for Scala 3 support in Kafka, while it tests use Slick
lazy val `kafka-tests` =
Project(id = "akka-projection-kafka-tests", base = file("akka-projection-kafka-tests"))
.configs(IntegrationTest)
.settings(Dependencies.kafkaTests)
.settings(Defaults.itSettings)
.settings(headerSettings(IntegrationTest))
.settings(Defaults.itSettings)
.settings(publish / skip := true)
.dependsOn(kafka, testkit % "test->it")
.dependsOn(slick % "test->test;it->test")
lazy val kafkaIntegration =
Project(id = "akka-projection-kafka-integration", base = file("akka-projection-kafka-integration"))
.settings(IntegrationTests.settings)
.settings(Dependencies.kafkaIntegration)
.dependsOn(kafka, testkit % "test->test")
.dependsOn(slick)
.dependsOn(slickIntegration % "test->test")
.disablePlugins(CiReleasePlugin)

// provides source providers for durable state changes
Expand Down Expand Up @@ -330,7 +325,6 @@ lazy val root = Project(id = "akka-projection", base = file("."))
cassandra,
eventsourced,
kafka,
`kafka-tests`,
`durable-state`,
grpc,
grpcTests,
Expand All @@ -345,7 +339,13 @@ lazy val root = Project(id = "akka-projection", base = file("."))

// separate aggregate for integration tests, note that this will create a directory when used (which is then gitignored)
lazy val integrationTests = Project(id = "akka-projection-integration", base = file("akka-projection-integration"))
.aggregate(cassandraIntegration, grpcIntegration, r2dbcIntegration, jdbcIntegration, slickIntegration)
.aggregate(
cassandraIntegration,
grpcIntegration,
jdbcIntegration,
kafkaIntegration,
r2dbcIntegration,
slickIntegration)

// check format and headers
TaskKey[Unit]("verifyCodeFmt") := {
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ object Dependencies {
Test.akkaStreamTestkit,
Test.logback)

val kafkaTests =
val kafkaIntegration =
deps ++= Seq(
Test.scalatest,
Test.akkaTypedTestkit,
Expand Down

0 comments on commit 0095faa

Please sign in to comment.