Skip to content

Commit 595a3e5

Browse files
fix: TestTimeIntegrationTest can skip the required shutdown and clean up if it asserts (#1896)
* fix * style adding comment
1 parent 81290ba commit 595a3e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/Timing/TimeMultiInstanceTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,13 @@ public IEnumerator TestTimeIntegrationTest(int targetFrameRate, uint tickRate)
8989
// compares the two client times, only difference should be based on buffering.
9090
m_Client1State.AssertCheckDifference(m_Client2State, 0.2 - tickInterval, (0.1 - tickInterval), tickInterval * 2 + frameInterval * 2 + k_AdditionalTimeTolerance);
9191
}
92+
}
9293

94+
protected override IEnumerator OnTearDown()
95+
{
96+
// Always "shutdown in a tear-down" otherwise you can cause all proceeding tests to fail
9397
ShutdownAndCleanUp();
98+
yield return base.OnTearDown();
9499
}
95100

96101
// This is from NetcodeIntegrationTest but we need a custom version of this to modifiy the config

0 commit comments

Comments
 (0)