Closed Erikvl87 closed 5 years ago
Did this happen once or is it reproducible? Which version of Java and which OS is this? I cannot reproduce the issue with Java 1.8.0_192 on Ubuntu 16.04.
Hi @danielnaber! Yes, I am able to reproduce this within Docker. The Docker image is running on debian:stretch (Debian 9.8) with openjdk-8-jdk-headless installed.
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.212-b01, mixed mode)
You'll be able to view the system configuration in my Dockerfile. I am not sure if you are known with Docker but you can reproduce this by building the mentioned Dockerfile and replacing this line: RUN ["bash", "build.sh", "languagetool-standalone", "package", "-DskipTests"]
with RUN ["mvn", "clean", "test"]
These are all lines that check STDOUT, by redirecting it to Java (System.setOut(new PrintStream(this.out));
). There's something special about STDOUT with docker, isn't it? Maybe our redirect just doesn't work and the STDOUT ends up somewhere else. I don't have time now to reproduce this now, though.
Alright, nevertheless thank you for your time. You gave me some helpful information where to look at. I'll try and do some more research myself.
I resolved the issue. Leaving the solution here for others.
It didn't had anything to do with the redirect of the STDOUT. The logs above contain stuff like Expected: is <1> but: was <2>
which gave me an indication that redirects are in fact working.
Viewing the source of the failing tests made me discover that the failing tests are writing Polish characters to the input stream so I guessed it could maybe be related to character encoding. So I've installed locales
and configured UTF-8 and that fixed the tests. 😃
@Erikvl87 and @danielnaber,
I do not use Docker and face the very same issue when I build through 'maven clean test'. In my opinion, the issue deserves to be re-opened.
For information purposes, I run on Windows and use Java 8. My individual parameters, though, do not matter much because other people (such as @Erikvl87) also have this issue and so it most likely has a common nature.
For a Docker image I am experimenting with testing the LanguageTool release before publishing an actual Docker image. I've found that running the tests (
mvn clean test
) for thev4.5.1
release returned some errors which in turn prevents me releasing the Docker image:Haven't the tests been run before releasing v4.5.1 or have I been doing something wrong in my setup?