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

Update testcontainers version, set image name and version explicitly #923

Merged
merged 4 commits into from
Mar 28, 2022
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
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val fs2Version = "3.2.5"

val kafkaVersion = "2.8.1"

val testcontainersScalaVersion = "0.40.0"
val testcontainersScalaVersion = "0.40.3"

val vulcanVersion = "1.8.0"

Expand Down Expand Up @@ -99,10 +99,8 @@ lazy val docs = project
lazy val dependencySettings = Seq(
resolvers += "confluent" at "https://packages.confluent.io/maven/",
libraryDependencies ++= Seq(
("com.dimafeng" %% "testcontainers-scala-scalatest" % testcontainersScalaVersion)
.cross(CrossVersion.for3Use2_13),
("com.dimafeng" %% "testcontainers-scala-kafka" % testcontainersScalaVersion)
.cross(CrossVersion.for3Use2_13),
"com.dimafeng" %% "testcontainers-scala-scalatest" % testcontainersScalaVersion,
"com.dimafeng" %% "testcontainers-scala-kafka" % testcontainersScalaVersion,
"org.typelevel" %% "discipline-scalatest" % "2.1.5",
"org.typelevel" %% "cats-effect-laws" % catsEffectVersion,
"org.typelevel" %% "cats-effect-testkit" % catsEffectVersion,
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</encoder>
</appender>

<root level="ERROR" additivity="false">
<root level="INFO" additivity="false">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes logs a lot noisier but I think it's more likely to be what you want if you're actually trying to track down a problem in them.

<appender-ref ref="STDOUT"/>
</root>
</configuration>
11 changes: 10 additions & 1 deletion modules/core/src/test/scala/fs2/kafka/BaseKafkaSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ abstract class BaseKafkaSpec extends BaseAsyncSpec with ForEachTestContainer {

override def runTest(testName: String, args: Args) = super.runTest(testName, args)

private val imageVersion = "7.0.1"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd test against both the earliest and latest supported version


private lazy val imageName = Option(System.getProperty("os.arch")) match {
case Some("aarch64") =>
"niciqy/cp-kafka-arm64" // no official docker image for ARM is available yet
case _ => "confluentinc/cp-kafka"
}

override val container: KafkaContainer = new KafkaContainer()
.configure { container =>
container
Expand All @@ -75,8 +83,9 @@ abstract class BaseKafkaSpec extends BaseAsyncSpec with ForEachTestContainer {
transactionTimeoutInterval.toMillis.toString
)
.withEnv("KAFKA_TRANSACTION_STATE_LOG_MIN_ISR", "1")
.withEnv("KAFKA_AUTHORIZER_CLASS_NAME", "kafka.security.auth.SimpleAclAuthorizer")
.withEnv("KAFKA_AUTHORIZER_CLASS_NAME", "kafka.security.authorizer.AclAuthorizer")
.withEnv("KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND", "true")
.setDockerImageName(s"$imageName:$imageVersion")

()
}
Expand Down