-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
No parameter resolver for EmbeddedKafkaZKBroker #2927
Comments
Confirmed as a bug.
Feel free to contribute the fix! As a workaround you can just use |
Thanks for quick response @artembilan. Should the |
Sounds reasonable , but if we cannot reach that logic easily in the condition , I wouldn’t spend too much time on that. Rather simple fix as we have discussed before . Or even better to say: let’s fix the bug first! The logic you are asking for could be considered as an improvement afterwards. |
Fixes: #2927 Starting a test without spring context with Embeded Lafka without `kraft` enabled and `EmbeddedKafkaZKBroker` as a test's parameter results in an exception: ``` No ParameterResolver registered for parameter [org.springframework.kafka.test.EmbeddedKafkaZKBroker broker] in method [public void test.SomeTest.test(org.springframework.kafka.test.EmbeddedKafkaZKBroker)]. org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter [org.springframework.kafka.test.EmbeddedKafkaZKBroker broker] in method [public void test.SomeTest.test(org.springframework.kafka.test.EmbeddedKafkaZKBroker)]. ``` For test config: ``` @test public void test(EmbeddedKafkaZKBroker broker) ``` * Fix `EmbeddedKafkaCondition` to use `EmbeddedKafkaBroker.class.isAssignableFrom(parameterContext.getParameter().getType());` instead of just `parameterContext.getParameter().getType().equals(EmbeddedKafkaBroker.class)`
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.1.0
Describe the bug
Starting a test without spring context with embeded kafka without kraft enabled and EmbeddedKafkaZKBroker as a test's parameter results in an exception.
To Reproduce
Expected behavior
EmbeddedKafkaZKBroker is resolved properly.
The text was updated successfully, but these errors were encountered: