Skip to content

test: Rewrite TransformInterpolationTests to remove its random failures - #4147

Merged
NoelStephensUnity merged 1 commit into
develop-2.0.0from
fix/test/transforminterpolationtests-random-failures
Aug 27, 2026
Merged

test: Rewrite TransformInterpolationTests to remove its random failures#4147
NoelStephensUnity merged 1 commit into
develop-2.0.0from
fix/test/transforminterpolationtests-random-failures

Conversation

@NoelStephensUnity

@NoelStephensUnity NoelStephensUnity commented Aug 27, 2026

Copy link
Copy Markdown
Member

Purpose of this PR

Overhauling this test since it has been problematic for a long time. The root cause is that the values applied ended forming a discontinuously-linear/saw-tooth motion which makes it very problematic to distinguish a fault from an actual valid interpolation.

The actual solution is to use a smoothed sinusoidal wave that forms a continuous motion that is discernable between a fault and the motion being applied.

Jira ticket

(Link ticket here)

Changelog

NA

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by the adjustments made to TransformInterpolationTest.
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Up-port

Up-port: #4148
Up-port is required.

Backports

None.

Overhauling this test since it has been problematic for a long time. The root cause is that the values applied ended forming a discontinuously-linear/saw-tooth motion which makes it very problematic to distinguish a fault from an actual valid interpolation.

The actual solution is to use a smoothed sinusoidal wave that forms a continuous motion that is discernable between a fault and the motion being applied. There were additional order of operation issues that

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Harness Review

Ship it

The rewritten integration test drives continuous authority motion through repeated transform-space transitions and validates the non-authority’s sampled world position. I examined its spawn/parenting flow, Host and distributed-authority fixture behavior, and the NetworkTransform update lifecycle.

Reviewed commit d53463f

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                Coverage Diff                @@
##           develop-2.0.0    #4147      +/-   ##
=================================================
- Coverage          73.95%   73.88%   -0.08%     
=================================================
  Files                172      172              
  Lines              28105    28105              
=================================================
- Hits               20785    20765      -20     
- Misses              7320     7340      +20     
Flag Coverage Δ
NGOv2_project_testproject_ubuntu_pinnedTrunk 73.59% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

Components Coverage Δ
com.unity.netcode.gameobjects 73.88% <ø> (-0.08%) ⬇️

ℹ️ Need help interpreting these results?

@michalChrobot michalChrobot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, we can just run this like 5 times to see if it's stable

@NoelStephensUnity
NoelStephensUnity merged commit 11f5776 into develop-2.0.0 Aug 27, 2026
28 checks passed
@NoelStephensUnity
NoelStephensUnity deleted the fix/test/transforminterpolationtests-random-failures branch August 27, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants