From a1a45056580749c7970938c939e3ad58ee45a5f8 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 26 Oct 2026 16:35:50 -0500 Subject: [PATCH] fix: run the Pose cases of the RPC serialization tests The Pose branches called the coroutine helpers without yield return, so the Pose cases passed without running and their native collections were never disposed. --- .../Tests/Runtime/Rpc/RpcTypeSerializationTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs index 0ca4f7ad87..0197eabb39 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Rpc/RpcTypeSerializationTests.cs @@ -1261,7 +1261,7 @@ public IEnumerator WhenSendingAValueTypeOverAnRpc_ValuesAreSerializedCorrectly( } else if (testType == typeof(Pose)) { - TestValueType( + yield return TestValueType( new Pose(new Vector3(5, 10, 15), new Quaternion(20, 25, 30, 35)), new Pose(new Vector3(40, 45, 50), new Quaternion(55, 60, 65, 70))); } @@ -1468,7 +1468,7 @@ public IEnumerator WhenSendingAnArrayOfValueTypesOverAnRpc_ValuesAreSerializedCo } else if (testType == typeof(Pose)) { - TestValueTypeArray( + yield return TestValueTypeArray( new Pose[] { new Pose(new Vector3(5, 10, 15), new Quaternion(20, 25, 30, 35)), new Pose(new Vector3(40, 45, 50), new Quaternion(55, 60, 65, 70)) }, new Pose[] { new Pose(new Vector3(75, 80, 85), new Quaternion(90, 95, 100, 105)), new Pose(new Vector3(110, 115, 120), new Quaternion(125, 130, 135, 140)), new Pose(new Vector3(145, 150, 155), new Quaternion(160, 165, 170, 175)) }); } @@ -1715,7 +1715,7 @@ public IEnumerator WhenSendingANativeArrayOfValueTypesOverAnRpc_ValuesAreSeriali } else if (testType == typeof(Pose)) { - TestValueTypeNativeArray( + yield return TestValueTypeNativeArray( new NativeArray(new Pose[] { new Pose(new Vector3(5, 10, 15), new Quaternion(20, 25, 30, 35)), new Pose(new Vector3(40, 45, 50), new Quaternion(55, 60, 65, 70)) }, Allocator.Persistent), new NativeArray(new Pose[] { new Pose(new Vector3(75, 80, 85), new Quaternion(90, 95, 100, 105)), new Pose(new Vector3(110, 115, 120), new Quaternion(125, 130, 135, 140)), new Pose(new Vector3(145, 150, 155), new Quaternion(160, 165, 170, 175)) }, Allocator.Persistent)); } @@ -1963,7 +1963,7 @@ public IEnumerator WhenSendingANativeListOfValueTypesOverAnRpc_ValuesAreSerializ } else if (testType == typeof(Pose)) { - TestValueTypeNativeList( + yield return TestValueTypeNativeList( new NativeList(Allocator.Persistent) { new Pose(new Vector3(5, 10, 15), new Quaternion(20, 25, 30, 35)), new Pose(new Vector3(40, 45, 50), new Quaternion(55, 60, 65, 70)) }, new NativeList(Allocator.Persistent) { new Pose(new Vector3(75, 80, 85), new Quaternion(90, 95, 100, 105)), new Pose(new Vector3(110, 115, 120), new Quaternion(125, 130, 135, 140)), new Pose(new Vector3(145, 150, 155), new Quaternion(160, 165, 170, 175)) }); }