Skip to content

Run Java integration tests in CI; make final-value test NaN-aware - #15

Merged
SiboVG merged 1 commit into
masterfrom
ci/integration-tests
Oct 1, 2026
Merged

SiboVG merged 1 commit into
masterfrom
ci/integration-tests

Conversation

@SiboVG

@SiboVG SiboVG commented Oct 1, 2026

Copy link
Copy Markdown
Member

Summary

  • New integration CI 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.
  • NaN-aware test. test_simulation_data_events_and_save_reload compared get_final_values with the last time-series sample using assertAlmostEqual, which can never pass for NaN. Some OpenRocket development builds (a local 23.09.SNAPSHOT) leave motor mass NaN on the first and last data point. get_final_values correctly returns that last sample, so the test now uses np.testing.assert_allclose(..., equal_nan=True); it still catches real mismatches.
  • get_final_values docstring: fixed the typo, documented branch_number and the return value, and noted that the final value can be NaN.
  • CONTRIBUTING, README and CHANGELOG updated.

Investigation of the earlier failure

The nan != nan failure 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:

OpenRocket Result
22.02 release 39/39 pass
23.09 release 39/39 pass
24.12 release 39/39 pass
26.xx snapshot 10e1e1476 39/39 pass

Also checked that the new assertion still fails on a real mismatch (1.0 vs 1.1) and on NaN vs a number.

The integration job 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.

- 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
@SiboVG
SiboVG merged commit b75b22a into master Oct 1, 2026
8 checks passed
@SiboVG
SiboVG deleted the ci/integration-tests branch October 1, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant