epubcheck icon indicating copy to clipboard operation
epubcheck copied to clipboard

Test failures. What's missing?

Open DavidGriffith opened this issue 5 years ago • 6 comments

I cannot complete a build of epubcheck without telling mvn to not do any tests. When I do mvn clean install, the process terminates with this complaint:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project epubcheck: There are test failures.

I can get a working .jar by using -DskipTests, but I suspect this causes the trouble I describe in #1147.

To get needed packages, I started with apt-get build-deps epubcheck, and then several others based on the error messages I got. But now I can't figure out what package to install to solve this complaint. It would be helpful if the build instructions included a list of packages required. I'm using Debian 10.

DavidGriffith avatar Jun 18 '20 23:06 DavidGriffith

How did you get the source code that you’re trying to build? Which Java version are you using?

The recommended way is to clone this GitHub repository and build from there. There is no need to manually download any third party dependencies, as Maven will do that for you.

If you can paste the full build log, I can have a look at what goes wrong with the tests.

rdeltour avatar Jun 19 '20 07:06 rdeltour

I got the source code by doing a git clone of this repository.

Here's the Java I'm using:

$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3deb10u1, mixed mode, sharing)

This is the output of mvn -e -X clean install: build_output.txt.gz

DavidGriffith avatar Jun 19 '20 23:06 DavidGriffith

UtilMessage_LocalizationTest.ensureDefault:23 Default constructor should use the (host) default locale. expected:<en> but was:<en_US> UtilMessage_LocalizationTest.ensureNullIsDefault:32 Null locale should use (host) default locale. expected:<en> but was:<en_US>

Looks like this is related to #916 and #919 but I'll leave it to one of the java folks here to figure out what specifically is going on.

mattgarrish avatar Jun 23 '20 00:06 mattgarrish

Thanks for the build output! I'll look into it during as part of the test suite refactoring milestone.

rdeltour avatar Jun 23 '20 07:06 rdeltour

I also have test failures when trying to generate.

I get an error during the tests with "mvn clean install": Failed tests: OverriddenMessageDictionaryTest.ensureOverridenMessages:29 Message should have been overridden.

with -e -X flags it looks like I get the same error as David reported above [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project epubcheck: There are test failures.

I'm using:

java version "1.8.0_251" Java(TM) SE Runtime Environment (build 1.8.0_251-b08) Java HotSpot(TM) Client VM (build 25.251-b08, mixed mode, sharing)

Maven home: C:...\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin.. Java version: 14.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-14.0.1 Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Code has been downloaded 20200623 14:58(bst). The log from "mvn -e -X clean install" is output20200623_2a.zip

TWBC-Ciren avatar Jun 23 '20 14:06 TWBC-Ciren

@DavidGriffith unfortunately I wasn’t able to reproduce the issue.

I also looked at the code and whenever the default locale is set in tests, it is reset to reset to its previous value. The only reasons I would see is if the tests are run concurrently, in which case the default-locale-related tests would need to be synchronized, but by default the tests should be run synchronously.

Would you mind trying again after updating your master branch to the latest commit? The entire test suite have been heavily refactored (although not all the locale-dependent tests), so the problem may just no longer exist.

rdeltour avatar Jul 16 '20 14:07 rdeltour

Closing this issue, which has been inactive for a while. Feel free to reopen if the issue persists with the new test suite in v5.x.

rdeltour avatar Dec 08 '22 10:12 rdeltour