Unable to build droid, surefire failures

91 views
Skip to first unread message

gonetil

unread,
Nov 4, 2013, 8:23:24 AM11/4/13
to droid...@googlegroups.com
Hi everyone!
I am trying to build droid 6.2.0 version, but mvn install fails during the test running stage:

Results :

Failed tests:   testFormatFileSize(uk.gov.nationalarchives.droid.util.FileUtilTest): expected:<11[.]7 MB> but was:<11[,]7 MB>
  testSaveEmptyProfileSpecAsXml
(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest): org.custommonkey.xmlunit.Diff(..)
  testSaveProfileSpecWithSomeResources
(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest)

Tests run: 89, Failures: 3, Errors: 0, Skipped: 9

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] droid-results ..................................... FAILURE [1:06.341s]
[INFO] droid-report-interfaces ........................... SKIPPED
[INFO] droid-report ...................................... SKIPPED
[INFO] droid-export ...................................... SKIPPED
[INFO] droid-command-line ................................ SKIPPED
[INFO] droid-help ........................................ SKIPPED
[INFO] droid-ui .......................................... SKIPPED
[INFO] droid-binaries .................................... SKIPPED
[INFO] droid ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:07.122s
[INFO] Finished at: Mon Nov 04 10:10:50 ART 2013
[INFO] Final Memory: 27M/409M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project droid-results: There are test failures.
[ERROR]
[ERROR] Please refer to /home/gonetil/Escritorio/droid/digital-preservation-droid-eeb6379/droid-results/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


I think I've the right versions for java and maven...The output of  mvn -v is:

Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun/jre
Default locale: es_AR, platform encoding: UTF-8
OS name
: "linux", version: "3.8.0-19-generic", arch: "amd64", family: "unix"

I haven't seen any jar download error, so I guess all packages have been downloaded just right.
Does anyone know what is going on?

Thanks in advance!


Graham Seaman

unread,
Nov 4, 2013, 9:37:31 AM11/4/13
to droid...@googlegroups.com
Hi gonetil

Looks like a localization issue: it seems that the Argentinian locale uses commas in numbers where the test is expecting a decimal point (and I guess decimal points where the test expects commas). There aren't many cases of this; I guess the quickest solution would just be to edit the tests to match your locale (in this case the third and fifth tests in the file FileUtilTest.java)

best regards

Graham

gonetil

unread,
Nov 4, 2013, 11:28:52 AM11/4/13
to droid...@googlegroups.com
Thanks Graham for the fast answer.

I tried that, and I got errors in other tests :

Results :

Failed tests:   testSaveEmptyProfileSpecAsXml(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest): org.custommonkey.xmlunit.Diff(..)
  testSaveProfileSpecWithSomeResources
(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest)


so I decided to rollback all my changes and switched my locale to en_US, instead of keep editing files. This is the output of mvn -v command right now:

$ mvn -v
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun/jre
Default locale: en_US, platform encoding: UTF-8

OS name
: "linux", version: "3.8.0-19-generic", arch: "amd64", family: "unix"

 


However, after running mvn clean install, I keep getting the same error above (in ProfileSpecToXmlPersistenceTest)

Results :

Failed tests:   testSaveEmptyProfileSpecAsXml(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest): org.custommonkey.xmlunit.Diff(..)
  testSaveProfileSpecWithSomeResources
(uk.gov.nationalarchives.droid.profile.ProfileSpecToXmlPersistenceTest)

Tests run: 89, Failures: 2, Errors: 0, Skipped: 9


[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] droid-parent ...................................... SUCCESS [3.088s]
[INFO] droid-build-tools ................................. SUCCESS [1.203s]
[INFO] droid-core-interfaces ............................. SUCCESS [39.622s]
[INFO] droid-core ........................................ SUCCESS [13.873s]
[INFO] droid-export-interfaces ........................... SUCCESS [9.176s]
[INFO] droid-container ................................... SUCCESS [27.268s]
[INFO] droid-results ..................................... FAILURE [51.501s]

[INFO] droid-report-interfaces ........................... SKIPPED
[INFO] droid-report ...................................... SKIPPED
[INFO] droid-export ...................................... SKIPPED
[INFO] droid-command-line ................................ SKIPPED
[INFO] droid-help ........................................ SKIPPED
[INFO] droid-ui .......................................... SKIPPED
[INFO] droid-binaries .................................... SKIPPED
[INFO] droid ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:26.479s
[INFO] Finished at: Mon Nov 04 13:25:24 ART 2013
[INFO] Final Memory: 41M/154M

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project droid-results: There are test failures.
[ERROR]
[ERROR] Please refer to /home/gonetil/Desktop/droid/digital-preservation-droid-eeb6379/droid-results/target/surefire-reports for the individual test results.

[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :droid-results


Any idea of what's wrong?

Graham Seaman

unread,
Nov 4, 2013, 12:22:04 PM11/4/13
to droid...@googlegroups.com
I'm afraid it's another localization problem, but this time with timezones. The tests could really do with some improvement! I'd suggest putting @Ignore before the failing tests as a stop-gap, just to see if you can get it all to compile. Then maybe go back and have a look at the tests when we know how many are problematic (hopefully these are the last ones)

Graham
Reply all
Reply to author
Forward
0 new messages