Skip to content
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

Use testcontainers-kafka for integration tests #355

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

Z1kkurat
Copy link
Contributor

@Z1kkurat Z1kkurat commented Jul 4, 2023

Motivation: we avoid pulling Kafka broker code into our test scope. This has a few benefits:

  • Kafka broker is independent of the Java version used. It's not an issue as far as I currently know, but it might be in the same spirit it was for Cassandra which required additional settings to be run with Java 11+
  • we can safely update our dependencies without possibly affecting Kafka broker (as they are in the same classpath currently)
  • it models a test case that's closer to a live usage - a separate broker, running in a separate container, rather than in the same JVM
  • it opens up a possible path of cross-compiling this library to Scala 3 since Kafka broker code is compiled against a specific Scala version
  • we bring fewer dependencies to the test scope, using only those we bring in with kafka-clients library
  • there won't be a mismatch between the used kafka-clients and Kafka broker versions. Using a different version is a matter of updating testcontainers-scala-kafka dependency or specifying a different image version manually

@coveralls
Copy link

coveralls commented Jul 4, 2023

Pull Request Test Coverage Report for Build 5452618040

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 76.731%

Totals Coverage Status
Change from base Build 5070546918: 0.2%
Covered Lines: 1352
Relevant Lines: 1762

💛 - Coveralls

@Z1kkurat Z1kkurat merged commit 20b51f7 into master Jul 13, 2023
5 checks passed
@Z1kkurat Z1kkurat deleted the testcontainers-kafka branch July 13, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants