You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/01/13 22:25:39 UTC
[GitHub] [kafka] mumrah opened a new pull request #11678: Expose MetadataCache through testkit framework
mumrah opened a new pull request #11678:
URL: https://github.com/apache/kafka/pull/11678
This cleans up a few things in ClusterInstance to make it more usable. Also fixes some old "raft" references.
I also adjusted the parameter injection that ClusterTestExtensions is doing to allow test classes to directly inject the specific type. This allows for easier implementation specific tests. For example, getting direct access to a MetadataImage when running a KRaft cluster:
```java
@ClusterTest(clusterType = Type.KRAFT, brokers = 1, controllers = 1)
public void testKRaftMetadataImage(KRaftClusterInstance instance) {
MetadataImage image = instance.brokerCurrentMetadataImages().get(0);
assertTrue(image.cluster().brokers().containsKey(0));
}
```
This should make it easier to write a class of tests where we want running controllers/brokers, but don't want to be restricted to using the APIs to test things.
--
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.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] cmccabe commented on pull request #11678: Expose MetadataCache through testkit framework
Posted by GitBox <gi...@apache.org>.
cmccabe commented on pull request #11678:
URL: https://github.com/apache/kafka/pull/11678#issuecomment-1012577468
Would it make more sense to expose the `KafkaBroker` object? We expose that in a lot of other cases, and it gives access to all the stuff
--
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.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org