Skip to content

Commit

Permalink
fix for flakes caused by accidental OOM errors reporting during iOS t…
Browse files Browse the repository at this point in the history
…ests (#805)
  • Loading branch information
richardelms authored May 30, 2024
1 parent 7c13017 commit 755567f
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 30 deletions.
4 changes: 4 additions & 0 deletions features/fixtures/maze_runner/Assets/Scripts/Scenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public virtual void PrepareConfig(string apiKey, string host)
Configuration.DotnetScriptingRuntime = FindDotnetScriptingRuntime();
Configuration.DotnetApiCompatibility = FindDotnetApiCompatibility();
Configuration.AutoTrackSessions = false;
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public void AddSwitchConfigValues(SwitchCacheType switchCacheType, int switchCacheIndex, string switchMountName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ public class CorruptedCacheFile : Scenario
public override void PrepareConfig(string apiKey, string host)
{
base.PrepareConfig(apiKey, host);
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ public override void PrepareConfig(string apiKey, string host)
{
base.PrepareConfig(apiKey, host);
Configuration.MaxPersistedEvents = 3;
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ public class PersistDeviceId : Scenario
public override void PrepareConfig(string apiKey, string host)
{
base.PrepareConfig(apiKey, host);
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ public override void PrepareConfig(string apiKey, string host)
{
base.PrepareConfig(apiKey, host);
Configuration.Context = "Error 1";
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ public override void PrepareConfig(string apiKey, string host)
{
base.PrepareConfig(apiKey, host);
Configuration.Context = "Error 2";
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ public override void PrepareConfig(string apiKey, string host)

return true;
});
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

public override void Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ public override void PrepareConfig(string apiKey, string host)
{
_eventsCorrect = CheckForEvents();
base.PrepareConfig(apiKey, host);
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
Configuration.EnabledErrorTypes.OOMs = false;
}
}

private bool CheckForEvents()
Expand Down
3 changes: 1 addition & 2 deletions features/ios/ios_native_errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Feature: iOS Native Errors
And I wait for 2 seconds
And On Mobile I relaunch the app
And I run the game in the "StartSDKDefault" state
And I wait to receive an error
And the exception "message" equals "The app was likely terminated by the operating system while in the foreground"
And I should receive no errors

Scenario: Last Run Info
When I run the game in the "IosNativeException" state
Expand Down

0 comments on commit 755567f

Please sign in to comment.