Skip to content

Commit 3a0f367

Browse files
test
Starting to look at the reoccurring OSX failures with some transform tests.
1 parent fd77043 commit 3a0f367

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformTests.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ namespace Unity.Netcode.RuntimeTests
8080
internal class NetworkTransformTests : NetworkTransformBase
8181
{
8282
protected const int k_TickRate = 60;
83+
84+
protected const int k_DefaultTimeTravelFrames = 1000;
8385
/// <summary>
8486
/// Constructor
8587
/// </summary>
@@ -749,11 +751,11 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t
749751
if (overideState == OverrideState.CommitToTransform)
750752
{
751753
// Wait for the deltas to be pushed
752-
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600);
754+
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames);
753755
Assert.True(success, $"[Position] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!");
754756
}
755757

756-
success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatch(), 600);
758+
success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatch(), k_DefaultTimeTravelFrames);
757759
Assert.True(success, $"Timed out waiting for positions to match {m_AuthoritativeTransform.transform.position} | {m_NonAuthoritativeTransform.transform.position}");
758760

759761
// test rotation
@@ -784,12 +786,12 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t
784786
if (overideState == OverrideState.CommitToTransform)
785787
{
786788
// Wait for the deltas to be pushed
787-
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600);
789+
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames);
788790
Assert.True(success, $"[Rotation] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!");
789791
}
790792

791793
// Make sure the values match
792-
success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationsMatch(), 600);
794+
success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationsMatch(), k_DefaultTimeTravelFrames);
793795
Assert.True(success, $"Timed out waiting for rotations to match");
794796

795797
m_AuthoritativeTransform.StatePushed = false;
@@ -818,12 +820,12 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t
818820
if (overideState == OverrideState.CommitToTransform)
819821
{
820822
// Wait for the deltas to be pushed
821-
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600);
823+
success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames);
822824
Assert.True(success, $"[Rotation] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!");
823825
}
824826

825827
// Make sure the scale values match
826-
success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleValuesMatch(), 600);
828+
success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleValuesMatch(), k_DefaultTimeTravelFrames);
827829
Assert.True(success, $"Timed out waiting for scale values to match");
828830
}
829831

0 commit comments

Comments
 (0)