fix: testproject wait - #4174
NoelStephensUnity wants to merge 5 commits into
Conversation
…iClientConnectionApproval - MessageOrderingTests.RpcOnNetworkSpawn tracked the spawned object by GlobalObjectIdHash instead of NetworkObjectId, and its wait loop set the success flag after one pass because the continue sat inside the foreach. It now waits on the NetworkObjectId through WaitForConditionOrTimeOut. - SpawnChangeOwnership and ConnectionApprovalMismatchTest created a TimeoutHelper that was never passed to WaitForConditionOrTimeOut, so their timeout asserts could never fail.
|
Check the configuration's TOML syntax, permitted settings, and size limit. See the error below. Error message: Configuration content:# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/
[github_app]
handle_pr_actions = ['opened', 'ready_for_review'] # PR events that auto-run pr_commands
pr_commands = ["/harness-review"] # what runs on those events
reviewer_commands = ["/harness-review"] # what runs when @u-pr is added as reviewer
|
The default TimeoutHelper waits 2 seconds. RpcOnNetworkSpawn's removed loop waited 4, and SpawnChangeOwnership and ConnectionApprovalMismatchTest previously fell back to the 8 second global helper.
|
@u-pr please review again |
|
The changes look good. Summary of Review
🤖 Helpful? 👍/👎 |
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-3.x.x #4174 +/- ##
==============================================
Coverage 78.19% 78.19%
==============================================
Files 153 153
Lines 26272 26272
==============================================
Hits 20544 20544
Misses 5728 5728
Flags with carried forward coverage won't be shown. Click here to find out more.
|
MessageOrderingTests created and tore down its NetworkManagers with NetcodeIntegrationTestHelpers and replicated logic that NetcodeIntegrationTest already provides, such as waiting for an object to spawn on every client. It now derives from NetcodeIntegrationTest, runs as both a host and a server, and uses WaitForSpawnedOnAllOrTimeOut and WaitForConditionOrTimeOut for every wait, so none of its waits can pass without the condition being met. test: use the NetcodeIntegrationTest spawn helpers in MessageOrderingTests SpawnChangeOwnership counted NetworkObjectTestComponent instances to detect the spawn; it now spawns with SpawnObject, waits with WaitForSpawnedOnAllOrTimeOut, and also checks that the client owns the object. SpawnRpcDespawn spawns with SpawnObject, takes its expected client count from TotalClients, and reports which of its conditions was not met through the WaitForConditionOrTimeOut error log.
|
@u-pr please review again |
|
The latest changes converting Review Summary
🤖 Helpful? 👍/👎 |
Purpose of this PR
This PR fixes three waits that could never fail (so a spawn or disconnect that never happened was still reported as a pass).
MessageOrderingTests.RpcOnNetworkSpawn:SpawnedObjectsusing itsGlobalObjectIdHashinstead of itsNetworkObjectId, so the lookup never matched.continuesat inside theforeach(it only skipped to the next client, not the next wait).NetworkObjectIdthroughWaitForConditionOrTimeOut.MessageOrderingTests.SpawnChangeOwnershipandMultiClientConnectionApproval.ConnectionApprovalMismatchTestcreated aTimeoutHelperthat was never passed toWaitForConditionOrTimeOut, and the tests' both checked this using anAssert.False(timeoutHelper.TimedOut)(i.e. if it is never used...it could never possibly fail..).PR Scope:
Test-only changes to
MessageOrdering.csandMultiClientConnectionApproval.cs. No runtime code changes.Jira ticket
N/A
Documentation
Testing & QA (How your changes can be verified during release Playtest)
MessageOrderingTestsMultiClientConnectionApprovalFunctional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?Up-port
Not needed. This PR targets
develop-3.x.x.Backports
develop-2.0.0has the same three bugs. A port todevelop-2.0.0will follow.