Skip to content

Commit 268c7ec

Browse files
fix: Increase timeout for UTP adapter tests (#1199)
Was 150ms or 350ms depending on the platform. Now bumped to 500ms for all platforms since there were occurences of tests timing out in CI.
1 parent d2db394 commit 268c7ec

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ namespace Unity.Netcode.UTP.RuntimeTests
99
{
1010
public static class RuntimeTestsHelpers
1111
{
12-
// 50ms should be plenty enough for any network interaction to occur (even roundtrips).
13-
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_ANDROID
14-
public const float MaxNetworkEventWaitTime = 0.35f;
15-
#else
16-
public const float MaxNetworkEventWaitTime = 0.15f;
17-
#endif
12+
// Half a second might seem like a very long time to wait for a network event, but in CI
13+
// many of the machines are underpowered (e.g. old Android devices or Macs) and there are
14+
// sometimes lag spikes that cause can cause delays upwards of 300ms.
15+
public const float MaxNetworkEventWaitTime = 0.5f;
1816

1917
// Wait for an event to appear in the given event list (must be the very next event).
2018
public static IEnumerator WaitForNetworkEvent(NetworkEvent type, List<TransportEvent> events)

0 commit comments

Comments
 (0)