Skip to content

fix: Extended UniversalRpcTests run times #3560

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

Open
wants to merge 7 commits into
base: release/1.14.0
Choose a base branch
from

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Jul 24, 2025

This PR condenses the total number of tests from roughly ~10k down to ~3.5k by grouping like test types and migrating all [Values] decorated parameters to local properties.

This helps to reduce:

  • The time spent setting up and tearing down a test for each unique parameter value combination.
  • The time spent starting and stopping NetworkManagers.
  • The total number of tests is more than cut in half.
    • There is a known limitation with 2021 & 2022 TestRunner where reaching/exceed the 8-10k total tests count range can start to impact performance.

Changelog

NA

Testing and Documentation

  • Includes some UniversalRpcTests refactoring.
  • Includes new UniversalRpcGroupedTests.
  • Includes commenting out all legacy tests that were migrated into UniversalRpcGroupedTests.

Backport

This most likely could be up-ported to v2.x, but for the time being this should be reviewed merged for the v1.14.0 release.

Excluding the inclusion of stack trace information from normal Debug.Log messages.
Refactored some of the UniversalRpcTests which brings the total test count down from 10K+ to around 3.5k tests.
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner July 24, 2025 02:03
Handling some PVP issues.
@michalChrobot
Copy link
Collaborator

I will first run the wrench tests locally on this branch to see if it fixes the problem

Updating the revised test to have a longer timeout and to log messages to avoid a "no log" timeout.
Fixing a timeout that could occur within UnityTransport.
Refactoring the optimizations on the two group override tests in order to provide a heartbeat to the logger while running through that set of tests.
Forgot to remove the two tests from the general tests enums list.
Fixing stability issue where message corruption could potentially fail if none of the 1st 4 bytes were 0.
Refactoring TestSendingWithSingleNotOverride and TestSendingWithSingleOverride to use a ValuesAttribute decorated  SendTo parameter to assure it provides a heartbeat to the logger.
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.

2 participants