From 53917ed17452e5ec5dd532846efbac0cc9cb5954 Mon Sep 17 00:00:00 2001 From: Simon Lemay Date: Fri, 17 Sep 2021 13:06:25 -0400 Subject: [PATCH 1/2] Increase timeout for UTP adapter tests 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. --- .../Tests/Runtime/Helpers/RuntimeTestsHelpers.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs b/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs index 3982c26dcb..3bacb65ac8 100644 --- a/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs +++ b/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs @@ -9,12 +9,10 @@ namespace Unity.Netcode.UTP.RuntimeTests { public static class RuntimeTestsHelpers { - // 50ms should be plenty enough for any network interaction to occur (even roundtrips). -#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_ANDROID - public const float MaxNetworkEventWaitTime = 0.35f; -#else - public const float MaxNetworkEventWaitTime = 0.15f; -#endif + // Half a second might seem like a very long time to wait for a network event, but in CI + // many of the machines are underpowered (e.g. old Android devices or Macs) and there are + // sometimes lag spikes that cause can cause delays upwards of 300ms. + public const float MaxNetworkEventWaitTime = 0.5f; // Wait for an event to appear in the given event list (must be the very next event). public static IEnumerator WaitForNetworkEvent(NetworkEvent type, List events) From 4b2359c1f85b56403161fe09d1af39915fdf5aeb Mon Sep 17 00:00:00 2001 From: Simon Lemay Date: Fri, 17 Sep 2021 13:06:25 -0400 Subject: [PATCH 2/2] fix: Increase timeout for UTP adapter tests 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. --- .../Tests/Runtime/Helpers/RuntimeTestsHelpers.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs b/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs index 3982c26dcb..3bacb65ac8 100644 --- a/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs +++ b/com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs @@ -9,12 +9,10 @@ namespace Unity.Netcode.UTP.RuntimeTests { public static class RuntimeTestsHelpers { - // 50ms should be plenty enough for any network interaction to occur (even roundtrips). -#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_ANDROID - public const float MaxNetworkEventWaitTime = 0.35f; -#else - public const float MaxNetworkEventWaitTime = 0.15f; -#endif + // Half a second might seem like a very long time to wait for a network event, but in CI + // many of the machines are underpowered (e.g. old Android devices or Macs) and there are + // sometimes lag spikes that cause can cause delays upwards of 300ms. + public const float MaxNetworkEventWaitTime = 0.5f; // Wait for an event to appear in the given event list (must be the very next event). public static IEnumerator WaitForNetworkEvent(NetworkEvent type, List events)