Repository navigation
Run Java integration tests in CI; make final-value test NaN-aware - #15
Merged
Merged
Conversation
- Add an `integration` CI job running the integration tests against the released OpenRocket 22.02, 23.09 and 24.12 jars (one job per version, Java 17, jar cached between runs) - Compare get_final_values with the last sample NaN-aware in the integration test; some development builds leave motor mass NaN on the last data point - Document branch_number, return value and possible NaN in get_final_values - Update CONTRIBUTING, README and CHANGELOG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
integrationCI job. Runs the Java integration tests against the released OpenRocket 22.02, 23.09 and 24.12 jars, one job per version (JPype allows one JVM per process). Java 17 (Temurin), jars downloaded from the GitHub releases and cached. Until now CI only ran the mock-based tests, so nothing automated checked the README's compatibility claims.test_simulation_data_events_and_save_reloadcomparedget_final_valueswith the last time-series sample usingassertAlmostEqual, which can never pass for NaN. Some OpenRocket development builds (a local23.09.SNAPSHOT) leave motor mass NaN on the first and last data point.get_final_valuescorrectly returns that last sample, so the test now usesnp.testing.assert_allclose(..., equal_nan=True); it still catches real mismatches.get_final_valuesdocstring: fixed the typo, documentedbranch_numberand the return value, and noted that the final value can be NaN.Investigation of the earlier failure
The
nan != nanfailure was specific to a stale development jar, not an orhelper bug: on the 23.09 and 24.12 releases the mass series has no NaNs and the full suite passes. 26.xx has no stable release, so CI doesn't cover it; CONTRIBUTING asks for a local run against a snapshot jar.Testing
Locally (macOS, Python 3.10, JPype 1.5, Java 17), full suite incl. integration tests, each in its own process:
10e1e1476Also checked that the new assertion still fails on a real mismatch (1.0 vs 1.1) and on NaN vs a number.
The
integrationjob itself has not run on a GitHub runner yet: this PR is its first run (Ubuntu, headless). If it fails there, that is a CI-environment issue to fix in this PR.