kafka-unit icon indicating copy to clipboard operation
kafka-unit copied to clipboard

Support Scala 2.10

Open jadams74 opened this issue 9 years ago • 5 comments

Would like to use this in a project that requires scala 2.10. kafka-unit is using org.apache.kafka:kafka_2.11 I need org.apache.kafka:kafka_2.10 for my projects.

compile('org.apache.kafka:kafka_2.11:0.8.2.2')

This dependency conflict causes fatal errors during KafkaServer startup:

Feb 22 2016 09:12:41.572 (ScalaTest-run:kafka.utils.Logging$class:fatal:116) FATAL - [Kafka Server 1], Fatal error during KafkaServer startup. Prepare to shutdown
java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;

I don't know the best way to proceed and support multiple scala versions but I can try a pull request if given the right direction. I was in the middle of writing a similar framework and would prefer to commit here then duplicate this work.

jadams74 avatar Feb 22 '16 16:02 jadams74

This would be easier with SBT, I don't think gradle supports cross compilation with different scala versions.

chbatey avatar Feb 26 '16 09:02 chbatey

@jadams74 Were you able to resolve this problem in a satisfying way?

mbode avatar Oct 20 '16 10:10 mbode

@mbode No. Use docker.

jadams74 avatar Oct 20 '16 13:10 jadams74

@jadams74 Could you go into a bit more detail? Are you using a Docker image containing a Kafka broker and then running your tests against that?

mbode avatar Oct 20 '16 13:10 mbode

@jadams74 I wrote a similar library for Scala. You may want to have a look at it. https://github.com/manub/scalatest-embedded-kafka.

@chbatey - hope you don't mind me writing this message!

manub avatar Nov 03 '16 14:11 manub