Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PassPredictorTest can fail depending on developer time zone and locale #5

Open
mattryall opened this issue Aug 13, 2020 · 0 comments
Open

Comments

@mattryall
Copy link

When cloning the project and running the tests in Sydney, Australia, I get several failures due to inconsistent time zones and date/time formats:

Results :

Failed tests:   testNextSatPass(uk.me.g4dpz.satellite.PassPredictorTest): expected:<2019-01-23T[06:26:35+00]00> but was:<2019-01-23T[17:26:35+11]00>
  testNextSatPassWithWindBack(uk.me.g4dpz.satellite.PassPredictorTest): expected:<2019-01-05T[05:45:35+00]00> but was:<2019-01-05T[16:45:35+11]00>
  correctToStringResult(uk.me.g4dpz.satellite.PassPredictorTest): expected:<...5, 2019(..)
  poleIsPassed(uk.me.g4dpz.satellite.PassPredictorTest): expected:<2019-01-05T[07:20:50+00]00, south> but was:<2019-01-05T[18:20:50+11]00, south>

Tests run: 34, Failures: 4, Errors: 0, Skipped: 0

I've identified the cause of the problem and have a patch ready. Pull request with a fix coming shortly.

mattryall added a commit to mattryall/predict4java that referenced this issue Aug 13, 2020
… zone + locale

- set UTC time zone for date formats in AbstractSatelliteTestBase
- set US locale for time format in SatPassTime.toString() so AM/PM are always capitalised
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

No branches or pull requests

1 participant