-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Kotlin example #1521
Kotlin example #1521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I like the idea of having a Kotlin-based example, I would use a different example:
- the provided example is too heavy (it uses Kafka which will add 10-20 seconds to our CI)
- it does not show how to set properties on containers, which is the biggest problem with Kotlin (see Problems with TestContainers and Kotlin #318)
- while it's okay to have Kotlin example, I would keep the Gradle DSL consistent with the rest of the projects here, in Groovy
@ClassRule
@JvmField
val redis = object : GenericContainer<Nothing>("redis:3-alpine") {
init {
withExposedPorts(6379)
}
} (this is pretty aligned with the ideas we have about the next generation of our DSL) |
|
Hi, could you review the changes? All review comments have been addressed. Or need something else to fix? Thank! |
hi @eaxdev, I just applied a few changes, should be good to merge after the CI reports green status :) |
@eaxdev merged. Thanks! 👍 |
Added an example that shows how to use
Testcontainers
along with theKotlin
language andSpring Boot
application. The example uses theGenericContainer
and Redis