You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/17 13:39:23 UTC
[GitHub] [camel] orpiske edited a comment on pull request #4242: Moves the Kafka test infrastructure
orpiske edited a comment on pull request #4242:
URL: https://github.com/apache/camel/pull/4242#issuecomment-694230502
@lburgazzoli this is related to the discussion about moving some of the reusable test infra from CKC to Camel Core.
Do you think this would do the trick for Camel Quarkus as well?
To use the code, you can add a dependency on camel-test-infra-kafka, like this:
```
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-kafka</artifactId>
<version>${camel.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
```
Then, the initialization of the Kafka Service is done using regular JUnit 5 extensions:
```
@RegisterExtension
public final KafkaService kafkaService = KafkaServiceFactory.createService();
```
And then use `kafkaService.getBootstrapServers()` to get the list of bootstrap servers so you can create the client and so on.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org