diff --git a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs index f6afcc406..e96f77b6f 100644 --- a/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs +++ b/test/Scripts.Integration.Test/Scripts/IntegrationOptionsConfiguration.cs @@ -45,8 +45,8 @@ public override void Configure(SentryUnityOptions options) options.DisableAnrIntegration(); #pragma warning restore CS0618 // Type or member is obsolete - // App Hang tracking - options.EnableAppHangTracking = true; + // Only for the app hang test: on a slow device the 2s watchdog fires in the other tests too, and the hang event carries their tags. + options.EnableAppHangTracking = IntegrationTester.GetTestArg() == "app-hang-capture"; options.AppHangTimeout = TimeSpan.FromSeconds(2); // Runtime initialization for integration tests diff --git a/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs b/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs index fe38471cb..68936f746 100644 --- a/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs +++ b/test/Scripts.Integration.Test/Scripts/IntegrationTester.cs @@ -85,9 +85,9 @@ public void Start() #if UNITY_IOS && !UNITY_EDITOR // .NET `Environment.GetCommandLineArgs()` doesn't seem to work on iOS so we get the test arg in Objective-C [DllImport("__Internal", EntryPoint="getTestArgObjectiveC")] - private static extern string GetTestArg(); + internal static extern string GetTestArg(); #else - private static string GetTestArg() + internal static string GetTestArg() { string arg = null; #if UNITY_EDITOR