Skip to content
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ project ('spring-kafka-test') {
api "org.apache.kafka:kafka_$scalaVersion:$kafkaVersion"
api "org.apache.kafka:kafka_$scalaVersion:$kafkaVersion:test"
api 'org.junit.jupiter:junit-jupiter-api'
providedApi 'org.junit.platform:junit-platform-launcher'
api 'org.junit.platform:junit-platform-launcher'
optionalApi "org.hamcrest:hamcrest-core:$hamcrestVersion"
optionalApi "org.mockito:mockito-core:$mockitoVersion"
optionalApi ("junit:junit:$junit4Version") {
Expand Down
3 changes: 3 additions & 0 deletions spring-kafka-docs/src/main/asciidoc/testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ For example, a `spring.embedded.kafka.brokers.property=spring.kafka.bootstrap-se
NOTE: It is recommended to not combine a global embedded Kafka and per-test class in a single test suite.
Both of them share the same system properties, so it is very likely going to lead to unexpected behavior.

NOTE: `spring-kafka-test` has transitive dependencies on `junit-jupiter-api` and `junit-platform-launcher` (the latter to support the global embedded broker).
If you wish to use the embedded broker and are NOT using JUnit, you may wish to exclude these dependencies.

[[embedded-kafka-annotation]]
==== @EmbeddedKafka Annotation
We generally recommend that you use the rule as a `@ClassRule` to avoid starting and stopping the broker between tests (and use a different topic for each test).
Expand Down