You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Jeff Klukas <jk...@simple.com> on 2016/04/25 15:53:56 UTC

Expose Kafka Streams test fixtures as a kafka-streams-test package?

As I'm developing a Kafka Streams application, I ended up copying the
content of streams/src/test/java/org/apache/kafka/test/ into my project in
order to use the KStreamTestDriver and associated functionality in tests,
which is working really well.

Would the Kafka team to open to refactoring these fixtures to be a separate
package, perhaps moving the source into a new
streams/test-fixtures/src/main and adding appropriate configuration to the
gradle build to pull in that package as a test dependency where needed and
to publish it as a separate artifact?

If there's interest in this, I would submit a PR.

Re: Expose Kafka Streams test fixtures as a kafka-streams-test package?

Posted by Guozhang Wang <wa...@gmail.com>.
Hi Jeff,

Thanks for bringing this up. I think it is a good idea for exposing unit
test utils as a separate jar; for example, here are the current jars we
have in Apache Kafka (* are the ones that are NOT included in the release):

   -

   kafka-tools.jar
   -

   kafka-examples.jar *
   -

   kafka_{scala-version}.jar (i.e. the "kafka-core" jar)
   -

   kafka_{scala-version}-test.jar (i.e. the "kafka-core-test" jar)
   -

   kafka-client.jar
   -

   kafka-streams.jar
   - kafka-connect-api.jar
   - kafka-connect-runtime.jar
   - kafka-connect-json.jar
   - kafka-connect-file.jar
   - kafka-log4j-appender.jar


The "kafka-core-test" contains all the unit tests for kafka-core including
the test util / mock / etc classes.

We can probably do the same for kafka-clients / streams /etc.

Guozhang


On Mon, Apr 25, 2016 at 6:53 AM, Jeff Klukas <jk...@simple.com> wrote:

> As I'm developing a Kafka Streams application, I ended up copying the
> content of streams/src/test/java/org/apache/kafka/test/ into my project in
> order to use the KStreamTestDriver and associated functionality in tests,
> which is working really well.
>
> Would the Kafka team to open to refactoring these fixtures to be a separate
> package, perhaps moving the source into a new
> streams/test-fixtures/src/main and adding appropriate configuration to the
> gradle build to pull in that package as a test dependency where needed and
> to publish it as a separate artifact?
>
> If there's interest in this, I would submit a PR.
>



-- 
-- Guozhang