Skip to content

fix: android time test failures due to edge case float precision errors #3351

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

Merged
merged 5 commits into from
Mar 18, 2025

Conversation

NoelStephensUnity
Copy link
Collaborator

NetworkTimeSystemTests.CorrectAmountTicksTest
Using the double version of tick frequency to calculate number of ticks passed.

TimeInitializationTest.TestClientTimeInitializationOnConnect
Dividing the double version of tick frequency to calculate number of ticks passed and using the double version of Math.Floor before casting that to an integer.

Changelog

NA

Testing and Documentation

  • Includes integration test updates.
  • No documentation changes or additions were necessary.

Tracking down time issue.
Adding additional debug information.
Time calculations using doubles as opposed to floats.
Cleaning up TimeInitializationTest a bit.
Removing extra CR.
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner March 18, 2025 04:42
Copy link
Collaborator

@michalChrobot michalChrobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for fixing this so fast!

@NoelStephensUnity NoelStephensUnity merged commit 8f2981b into develop-2.0.0 Mar 18, 2025
29 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/android-time-test-failures branch March 18, 2025 15:40
michalChrobot pushed a commit that referenced this pull request Mar 19, 2025
…rs (#3351)

`NetworkTimeSystemTests.CorrectAmountTicksTest`
Using the double version of tick frequency to calculate number of ticks
passed.

`TimeInitializationTest.TestClientTimeInitializationOnConnect`
Dividing the double version of tick frequency to calculate number of
ticks passed and using the double version of `Math.Floor` before casting
that to an integer.

## Changelog

NA

## Testing and Documentation

- Includes integration test updates.
- No documentation changes or additions were necessary.

<!-- Uncomment and mark items off with a * if this PR deprecates any
API:
### Deprecated API
- [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter
yyyy-mm-dd)` entry.
- [ ] An [api updater] was added.
- [ ] Deprecation of the API is explained in the CHANGELOG.
- [ ] The users can understand why this API was removed and what they
should use instead.
-->
@michalChrobot michalChrobot added the port:1.x-completed This issue was ported to 1.X branch label Mar 19, 2025
michalChrobot added a commit that referenced this pull request Apr 2, 2025
…cision errors (#3352)

This PR is a backport of
#3351

Some changes were not included because those were already present on
develop branch. All Android tests passed before merging

Co-authored-by: Noel Stephens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port:1.x-completed This issue was ported to 1.X branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants