Ticket #63 (assigned defect)

Opened 2 years ago

Last modified 2 years ago

the build fails under ubuntu during the validator testing phase

Reported by: pm Owned by: pm
Priority: minor Milestone: Later
Component: development Keywords: linux ubuntu validator test build fail
Cc:

Description


Change History

Changed 2 years ago by pm

  • status changed from new to assigned

The test output:

pm@pm-desktop:~/workspace/wirexn/validator/target/surefire-reports$ cat org.wirexn.validator.ValidatorTest.txt 
-------------------------------------------------------------------------------
Test set: org.wirexn.validator.ValidatorTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 16.323 sec <<< FAILURE!
testValidate(org.wirexn.validator.ValidatorTest)  Time elapsed: 16.089 sec  <<< FAILURE!
junitx.framework.ComparisonFailure: actual validation results differ from expected results Line [2] expected:<...goo/MANIFEST.mf.xml]:referenced package nonexistent.foo manifest not found or is invalid> but was:<...foo/MANIFEST.mf.xml]:duplicate package reference invalid.goo>
        at junitx.framework.Assert.assertEquals(Assert.java:120)
        at junitx.framework.FileAssert.assertEquals(FileAssert.java:175)
        at junitx.framework.FileAssert.assertEquals(FileAssert.java:116)
        at org.wirexn.validator.ValidatorTest.testValidate(ValidatorTest.java:82)
        at org.wirexn.validator.ValidatorTest.testValidate(ValidatorTest.java:82)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

Changed 2 years ago by pm

  • milestone changed from Ready for Open Source to Later

Under Ubuntu (perhaps on other Linux-es as well), the actual test results appear on a different order than on WinXP... This might mean that the file scanning order is different between these systems.

The only solution right now is to disable testing for this module (e.g. using the -Dmaven.test.skip=true command-line flag).

Changed 2 years ago by pm

See  org.apache.commons.io.DirectoryWalker#walk

There is a call to  java.io.File#listFile. This method doesn't guarantee a specific order...

It seems that the only way out of this is a re-write of the DirectoryWalker? class...

Note: See TracTickets for help on using tickets.