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 [CE2] #356

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

Z1kkurat
Copy link
Contributor

@Z1kkurat Z1kkurat commented Jul 4, 2023

This is a backport of #355

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

@Z1kkurat Z1kkurat changed the title Use testcontainers-kafka for integration tests Use testcontainers-kafka for integration tests [CE2] Jul 4, 2023
@coveralls
Copy link

coveralls commented Jul 4, 2023

Pull Request Test Coverage Report for Build 5452682697

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

Totals Coverage Status
Change from base Build 5070572748: 1.6%
Covered Lines: 1256
Relevant Lines: 1657

💛 - Coveralls

@Z1kkurat Z1kkurat merged commit 21f6f2c into ce2 Jul 13, 2023
@Z1kkurat Z1kkurat deleted the testcontainers-kafka-ce2 branch July 13, 2023 14:47
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.

2 participants