[ 
https://issues.apache.org/jira/browse/KAFKA-17174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868220#comment-17868220
 ] 

Chia-Ping Tsai commented on KAFKA-17174:
----------------------------------------

[~ChrisEgerton] thanks for your response. I'd like to keep the discussion here 
to avoid noise on  https://github.com/apache/kafka/pull/16599 

{quote}
 that's been created and possibly started out-of-band, which would actually be 
less convenient than our current embedded cluster API and IMO is not a path we 
should pursue.
{quote}

`ClusterInstance` can be started in-band if you disable the auto-start.

{quote}
TL;DR: While I'm also not opposed to adopting the ClusterTestExtensions API in 
Connect, I don't think we should start work on that until we have a plan in 
place for how we can do it for all of our integration tests instead of just 
some.
{quote}

You are right that we should have a plan for it. Maybe we can start by 
`EmbeddedKafkaCluster`:

1. change `EmbeddedKafkaCluster` to interfact
2. offer two impls of `EmbeddedKafkaCluster`. origin impl + impl by 
`ClusterInstance`.
3. `EmbeddedConnect` will have another constructor which can take 
`ClusterInstance` as argument

Also, we can enhance `ClusterInstance` according to use case of connect in this 
migration.

{quote}
 I don't think we should fragment Connect's integration tests and use 
EmbeddedKafkaCluster in some but ClusterInstance in others
{quote}

Unfortunately, fragment must happen since connect is a huge module. It is hard 
to address migration in few PRs. We have similar experience in migrating mock 
tool and updating junit, right

> Migrate OffsetsApiIntegrationTest to use ClusterTestExtensions
> --------------------------------------------------------------
>
>                 Key: KAFKA-17174
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17174
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>
> Connect module has its `EmbeddedKafkaCluster`, so another alternative is to 
> re-implement it by `ClusterInstance`. However, both of them are a kind of 
> "embedded service" interface. Personally, I prefer to unify the interface for 
> all modules in testing. We can move any useful helpers from 
> `EmbeddedKafkaCluster` to `ClusterInstance` in order to make other modules 
> get benefits too.
> `OffsetsApiIntegrationTest` is a lightweight user of  `EmbeddedKafkaCluster`, 
> so it can be a good entrypoint to introduce `ClusterInstance` to connect 
> module



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to