Thanks Jay and Neha. I built kafka_2.8.0-0.8.0-beta1-test.jar, which contains the TestUtils class. Is there any sample java code for writing kafka test cases?
Regards, Jiang -----Original Message----- From: Jay Kreps [mailto:jay.kr...@gmail.com] Sent: Monday, August 19, 2013 12:33 PM To: users@kafka.apache.org Subject: Re: kafka_2.8.0-0.8.0-beta1.jar doesn't include kafka.utils.TestUtils These are really tests, not something we should necessarily ship. They live in the kafka-test jar, which I think is right. You can build them by running ./sbt test:package I would prefer adding this to the main package target rather than moving our test code into the main source directory. -Jay On Mon, Aug 19, 2013 at 9:25 AM, Neha Narkhede <neha.narkh...@gmail.com>wrote: > You raised a good point. The same is true for all the tools that are > under src/core/src/test/scala/other/kafka. > I think we need to fix the packaging under src/core/test. Probably > move the tools under core/src/main/scala/kafka/tools so that it goes > in the main Kafka jar. And either include the test utils there or publish a > test jar. > Please can you file a JIRA for this? > > Thanks, > Neha > > > On Mon, Aug 19, 2013 at 9:08 AM, Wu, Jiang2 <jiang2...@citi.com> wrote: > > > Hi, > > > > In Kafka source code, kafka.utils.TestUtils is defined in > > src/core/src/test/scala/unit/kafka/utils/TestUtils.scala, but the > > kafka_2.8.0-0.8.0-beta1.jar doesn't include kafka.utils.TestUtils. > > I'm wondering how to write java unit test using kafka.utils.TestUtils? > Should I > > use some other jars or to compile one from the scala source code? > > Sorry > if > > it's a rudimentary question; I know little about scala, just know it > > can > be > > compiled to java class. > > > > Thanks, > > Jiang > > > > >