Java projects are forced to include ScalaTest as dependency #1147

Closed
jlprat opened this Issue May 19, 2017 · 1 comment

Comments

Projects
None yet
2 participants
Member

jlprat commented May 19, 2017

Currently if you want to use the Java test suit in a Java project you need to include ScalaTest as a dependency.

Java developers don't need this dependency on their projects, thus it should not be forced to be added.

Currently if it's not added you get the following error:

[info] [info] Compiling 3 Java sources to /tmp/sbt_823bc44b/scripted/target/scala-2.12/test-classes...
[info] [error] /tmp/sbt_823bc44b/scripted/src/test/java/com/example/HttpServerHttpAppTest.java:10: cannot access org.scalatest.junit.JUnitSuiteLike
[info] [error]   class file for org.scalatest.junit.JUnitSuiteLike not found
[info] [error] public class HttpServerHttpAppTest extends JUnitRouteTest {
[info] [error] /tmp/sbt_823bc44b/scripted/src/test/java/com/example/HttpServerHttpAppTest.java:17: cannot find symbol
[info] [error]   symbol:   method testRoute(akka.http.javadsl.server.Route)
[info] [error]   location: class com.example.HttpServerHttpAppTest
[info] [error]     appRoute = testRoute(server.route());
[info] [error] (test:compileIncremental) javac returned nonzero exit code

Discovered during akka/akka-http-java-seed.g8#1

jlprat referenced this issue in akka/akka-http-java-seed.g8 May 19, 2017

Merged

Initial seed #1

jrudolph added the community label Jun 12, 2017

@jrudolph jrudolph added a commit to jrudolph/akka-http that referenced this issue Jun 12, 2017

@jrudolph jrudolph =htk #1147 don't reference JUnitSuiteLike in Java JUnit testing infra…
…structure


Fixes #1147.
0643552
Member

jrudolph commented Jun 12, 2017

Yep, good one. Probably there's no reason that JUnitSuiteLike is referenced at all.

jrudolph self-assigned this Jun 12, 2017

jlprat closed this in #1189 Jun 12, 2017

@jlprat jlprat added a commit that referenced this issue Jun 12, 2017

@jlprat jlprat Merge pull request #1189 from jrudolph/jr/w/1147-dont-reference-scala…
…test-in-junit-testing-support

=htk #1147 don't reference JUnitSuiteLike in Java JUnit testing infrastructure
a7546ed

jlprat removed the 3 - in progress label Jun 12, 2017

jlprat added this to the 10.0.8 milestone Jun 12, 2017

jlprat referenced this issue in akka/akka-http-java-seed.g8 Jun 13, 2017

Closed

Remove scalatest dependency once 10.0.8 is out #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment