Failing tests in collision package

I keep getting failing tests:

INFO] Running org.orekit.ssa.collision.shorttermencounter.probability.twod.Patera2005Test
[ERROR] Tests run: 43, Failures: 0, Errors: 2, Skipped: 2, Time elapsed: 0.041 s <<< FAILURE! - in org.orekit.ssa.collision.shorttermencounter.probability.twod.Patera2005Test
[ERROR] testComputeProbabilityFromACdm  Time elapsed: 0.004 s  <<< ERROR!
org.orekit.errors.OrekitException: unable to find file /collision-resources/ION_SCV8_vs_STARLINK_1233.txt
	at org.orekit.ssa.collision.shorttermencounter.probability.twod.Patera2005Test.testComputeProbabilityFromACdm(Patera2005Test.java:450)

[ERROR] testComputeProbabilityFromACdmField  Time elapsed: 0 s  <<< ERROR!
org.orekit.errors.OrekitException: unable to find file /collision-resources/ION_SCV8_vs_STARLINK_1233.txt
	at org.orekit.ssa.collision.shorttermencounter.probability.twod.Patera2005Test.testComputeProbabilityFromACdmField(Patera2005Test.java:885)

[INFO] Running org.orekit.ssa.collision.shorttermencounter.probability.twod.Laas2015Test
[ERROR] Tests run: 43, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.042 s <<< FAILURE! - in org.orekit.ssa.collision.shorttermencounter.probability.twod.Laas2015Test
[ERROR] testReturnExpectedProbabilityFromACdmField  Time elapsed: 0.001 s  <<< ERROR!
org.orekit.errors.OrekitException: unable to find file /collision-resources/ION_SCV8_vs_STARLINK_1233.txt
	at org.orekit.ssa.collision.shorttermencounter.probability.twod.Laas2015Test.testReturnExpectedProbabilityFromACdmField(Laas2015Test.java:852)

[ERROR] testComputeProbabilityFromACdm  Time elapsed: 0.001 s  <<< ERROR!
org.orekit.errors.OrekitException: unable to find file /collision-resources/ION_SCV8_vs_STARLINK_1233.txt
	at org.orekit.ssa.collision.shorttermencounter.probability.twod.Laas2015Test.testComputeProbabilityFromACdm(Laas2015Test.java:441)

[INFO] Running org.orekit.ssa.collision.shorttermencounter.probability.twod.ShortTermEncounter2DDefinitionTest

The file ION_SCV8_vs_STARLINK_1233.txt is copied in the target/test-classes/collision-resources/ directory. I don’t understand why the test does not run.

Did anyone encounter this?

Hi Luc,

It’s linked to this issue and the OS apparently. They fail on my side too. I’ll let @MaximeJ or @Vincent comment further.

Best,
Romain

Well, I’m not using Windows and it fails there on a fresh install of the system on a new machine with Debian Trixie and openJDK 17.

It’s a problem @MaximeJ encountered when running tests locally (Windows OS) while i did not have any issues (Linux OS). It seems that when we fix the issue on one OS, it fails for the other but in both cases, it runs smoothly on the runner.

I’ll look at it this evening when I am back in front of the machine that triggers the problem.

I am currently fixing 1208 (default configuration in Patera2005). I’ll try to see if i can fix 1153 (failing tests) as well. I’ll keep you updated.

Hi all,

I’ve tested with JDK 17 on my machine (Windows OS) and it crashes, while it worked like a charm with JDK 8.

So I think we found our culprit…

@Serrof, what OS and what version of JDK are you using?

It looks like it can be fixed for both JDK by removing Thread.currentThread(). in:

Thread.currentThread().getClass().getResourceAsStream(cdmPath)

Thank you @pascal.parraud for the hint.

Also, it seems to be related to the Maven build. When launching the tests from an IDE it works with both JDK. It’s when it is run by Maven that failures will appear depending on the version of JDK…

I confirm I encountered this using maven build from the command line (Eclipse does not work yet on my new machine)