diff --git a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs index 65159597688..934255ab7e1 100644 --- a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs +++ b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs @@ -86,6 +86,7 @@ public virtual async Task DisposeAsync() public virtual void Dispose() { Assert.True(PInvoke.SystemParametersInfo(SYSTEM_PARAMETERS_INFO_ACTION.SPI_SETCLIENTAREAANIMATION, ref _clientAreaAnimation)); + DataCollectionService.CurrentTest = null; } protected async Task WaitForIdleAsync() diff --git a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/DataCollectionService.cs b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/DataCollectionService.cs index 1a2a3ff58e3..1a70266b34b 100644 --- a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/DataCollectionService.cs +++ b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/DataCollectionService.cs @@ -94,7 +94,7 @@ public static void RegisterCustomLogger(Action callback, string logId, s internal static string GetTestName(ITestCase testCase) { var testMethod = testCase.TestMethod.Method; - var testClass = testMethod.Type.Name; + var testClass = testCase.TestMethod.TestClass.Class.Name; var lastDot = testClass.LastIndexOf('.'); testClass = testClass.Substring(lastDot + 1); return $"{testClass}.{testMethod.Name}";