[ https://issues.apache.org/jira/browse/KAFKA-4401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15662147#comment-15662147 ]
Ewen Cheslack-Postava commented on KAFKA-4401: ---------------------------------------------- [~becket_qin] We've already done much of this work for some of our Java-based projects, e.g. see https://github.com/confluentinc/schema-registry/blob/master/core/src/test/java/io/confluent/kafka/schemaregistry/ClusterTestHarness.java and with variants for security, e.g. https://github.com/confluentinc/schema-registry/blob/master/core/src/test/java/io/confluent/kafka/schemaregistry/SSLClusterTestHarness.java. These have actually caused a bit of pain because they rely on internals so can break unexpectedly due to changes in Kafka. Given that, it would be handy if they were just part of Kafka itself. We could probably lift most of these implementations directly (they include schema registry startup as well, but that should be trivial to strip out.) That said, we've actually moved away from including integration tests like this in most of our projects in favor of putting tests like these into system tests. They remain in our schema registry and REST proxy mainly for historical reasons, i.e. the cost of refactoring them hasn't become worth it in these cases since the tests can still run relatively quickly (compared to Kafka's tests which now have so many integration tests that they dominate the 15-20 minute test runtime on a developer laptop). I'm a bit torn as to whether this would be a good addition; on the one hand people are doing this so standardizing it and avoiding 83 different implementations seems good, on the other hand I think it leads to people dumping too many tests that are actually system tests into tests that they call integration tests and run via unit tests... > Change the KafkaServerTestHarness and IntegrationTestHarness from trait to > abstract class. > ------------------------------------------------------------------------------------------ > > Key: KAFKA-4401 > URL: https://issues.apache.org/jira/browse/KAFKA-4401 > Project: Kafka > Issue Type: Task > Components: unit tests > Affects Versions: 0.10.1.0 > Reporter: Jiangjie Qin > Assignee: Jiangjie Qin > Fix For: 0.10.1.1 > > > The IntegartionTestHarness and KafkaServerTestHarness are useful not only in > Kafka unit test, but also useful for the unit tests in other products that > depend on Kafka. > Currently there are two issues making those two test harness classes hard to > use by other Java users. > 1. The two classes are Scala traits. This makes it difficult for people to > write Java unit test code. > 2. Some of the interfaces are Scala only. > It will be good to expose those two classes for more general usage and make > them Java friendly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)