Skip to content

Commit ce556e3

Browse files
test: keep the original wait budgets for the fixed timeouts
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.
1 parent 1ee5109 commit ce556e3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎testproject/Assets/Tests/Runtime/MessageOrdering.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public IEnumerator SpawnChangeOwnership()
9898
serverNetworkObject.ChangeOwnership(clients[0].LocalClientId);
9999

100100
// Wait until all objects have spawned.
101-
var timeoutHelper = new TimeoutHelper();
101+
var timeoutHelper = new TimeoutHelper(8.0f);
102102
yield return NetcodeIntegrationTest.WaitForConditionOrTimeOut(() => NetworkObjectTestComponent.SpawnedInstances.Count == numClients + 1, timeoutHelper);
103103
Assert.False(timeoutHelper.TimedOut, "Did not successfully spawn all expected NetworkObjects");
104104
}
@@ -273,7 +273,7 @@ public IEnumerator RpcOnNetworkSpawn()
273273
m_SpawnedNetworkObjectId = serverNetworkObject.NetworkObjectId;
274274

275275
// Make sure everyone spawns the object
276-
var timeoutHelper = new TimeoutHelper();
276+
var timeoutHelper = new TimeoutHelper(4.0f);
277277
yield return NetcodeIntegrationTest.WaitForConditionOrTimeOut(() => AllClientsSpawnedObject(clients), timeoutHelper);
278278
Assert.False(timeoutHelper.TimedOut, $"Timed out waiting for all clients to spawn {serverNetworkObject.name}!");
279279

‎testproject/Assets/Tests/Runtime/MultiClientConnectionApproval.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public IEnumerator ConnectionApprovalMismatchTest([Values(true, false)] bool ena
400400
Assert.Fail("Failed to start instances");
401401
}
402402

403-
var timeoutHelper = new TimeoutHelper();
403+
var timeoutHelper = new TimeoutHelper(8.0f);
404404
yield return NetcodeIntegrationTest.WaitForConditionOrTimeOut(() => m_ClientDisconnectedInvocations == 3, timeoutHelper);
405405
Assert.False(timeoutHelper.TimedOut, "Timed out waiting for clients to be disconnected!");
406406
Assert.AreEqual(3, m_ClientDisconnectedInvocations);

0 commit comments

Comments
 (0)