exercism/java-test-runner

Java tests in Say exercise passing locally but failing online

johnmarkos opened this issue · 3 comments

I have uncommented all the tests, and although they pass locally, online they fail with this error (Could not resolve junit:junit:4.12):

Execution failed for task ':say:compileTestJava'. 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':say:compileTestJava'.
> Could not resolve all files for configuration ':say:testCompileClasspath'.
   > Could not resolve junit:junit:4.12.
     Required by:
         project :say
      > No cached version of junit:junit:4.12 available for offline mode.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s

Hi @johnmarkos
some notes about this problem:

I think the problem depends on e3ae5a8

Test runner has been upgraded to junit 1.13 while the Say exercise uses junit 1.12 https://github.com/exercism/java/blob/main/exercises/practice/say/build.gradle.
Test runner executes gradle offline so it cannot connect to internet to retrieve 1.12 dep.

I'll try to fix the deps of say exercise.

@johnmarkos I fixed the say exercise. Can you please try it again to confirm the patch fixes the problem ?

Hi, @mirkoperillo -- it works! Thanks!