Skip to content

Conversation

artembilan
Copy link
Member

Fixes #2582

Even if we don't use Embedded Kafka in native image or even if Apache Kafka broker (or Zookeeper) is not compatible, the GlobalEmbeddedKafkaTestExecutionListener is still service-loaded by JUnit platform and according to build time some classes (Logger) are initialized too early

  • Refactor GlobalEmbeddedKafkaTestExecutionListener to initialize Log property and check for TestPlan.getConfigurationParameters() method lazily already in the testPlanExecutionStarted()

Fixes spring-projects#2582

Even if we don't use Embedded Kafka in native image or even if Apache Kafka
broker (or Zookeeper) is not compatible, the `GlobalEmbeddedKafkaTestExecutionListener`
is still service-loaded by JUnit platform and according to build time some classes (`Logger`)
are initialized too early

* Refactor `GlobalEmbeddedKafkaTestExecutionListener` to initialize `Log` property
and check for `TestPlan.getConfigurationParameters()` method lazily already
in the `testPlanExecutionStarted()`
@garyrussell garyrussell merged commit 711d18c into spring-projects:main Feb 21, 2023
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.

spring-kafka-test does not work with spring native graalvm
2 participants