[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] Errors Building Orekit



Hi Anees,

aneesahmad118@gmail.com a écrit :

Dear Sir/Madam

I am interested in using Orekit for orbit propagation, but have run into some
issues in trying to build it with Maven. I have no previous experience with
Maven and very little experience with Java, so have no idea how to go about
troubleshooting this, and was hoping you could give me some advice to help me
work out where the issue could be coming from.

I am using Java Development Kit 8 update 11 and Maven version 3.0.5. I have
downloaded Orekit version 6.1 from the Orekit website and extracted the files
to the directory C:Users\User\Documents\Orekit.

I initially contacted Luc Maisonobe, who suggested that the issue could be
coming from the fact I was using an older version of the Jacoco plugin. On his
advice, I changed the relevant line in the pom.xml file from  <orekit.jacoco-
maven-plugin.version>0.6.3.201306030806</orekit.jacoco-maven-plugin.version>
to <orekit.jacoco-maven-plugin.version>0.7.1.201405082137</orekit.jacoco-
maven-plugin.version>. After attempting to build the package again, I
encountered what seems to be a different error. The command window output is
given below.

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in
o
rg.orekit.frames.LocalOrbitalFrameTest
Running org.orekit.frames.MODProviderTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec -
in
org.orekit.frames.MODProviderTest
Running org.orekit.frames.OrphanFrameTest

[snip]

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.11 sec - in
or
g.orekit.propagation.semianalytical.dsst.utilities.NewcombOperatorTest
Running org.orekit.propagation.SpacecraftStateTest
Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.166 sec <<<
FA
ILURE! - in org.orekit.propagation.SpacecraftStateTest
testAdditionalStates(org.orekit.propagation.SpacecraftStateTest)  Time
elapsed:
0.201 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:<test-[2]> but was:<test-[1]>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at
org.orekit.propagation.SpacecraftStateTest.testAdditionalStates(Space
craftStateTest.java:210)


[snip]



Any advice you could provide on how to resolve this issue would be much
appreciated.

This is indeed a bug in the test itself, which is not robust enough. This bug was detected a week ago and fixed in the development version of Orekit. The problem is that this test set up two additional states (test-1 and test-2) which are stored in a map, and then checks that some incompatibility is properly detected and an appropriate exception is thrown. However, when checking the resulting exception, the test assumes the first additional state test-1 will be checked first. This is not robust because a map does not ensure the order of the contained elements is preserved, so some times the second additional state test-2 is checked first and the exception refers to it.

One nasty problem here is that the test failing for this reason depends on the JVM you use.

You can change the src/test/java/org/orekit/propagation/SpacecraftStateTest.java file as show here in order to have a more robust test that will not fail randomly.

<https://www.orekit.org/forge/projects/orekit/repository/revisions/3796388da3ac8827473aadbd4e329630fe91722f/diff/src/test/java/org/orekit/propagation/SpacecraftStateTest.java>


I am sorry for this, its a bug.

best regards,
Luc


Regards,

Anees Ahmad





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.