From 7f50efbe7ea62cd5cc4a2ae53c8885fa3a03311e Mon Sep 17 00:00:00 2001 From: ddrobotov Date: Fri, 8 Apr 2022 15:47:21 +0200 Subject: [PATCH] Add `Skip` attribute or adjust skip condition for flaky tests These tests sometimes fail in CI and block deployment. Related issues: #6610, #6714, #6739, #6926 --- .../IntegrationTests/UIIntegrationTests/ButtonTests.cs | 3 ++- .../System/Windows/Forms/DataGridViewTests.cs | 10 ++++------ .../UnitTests/System/Windows/Forms/ToolStripTests.cs | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/ButtonTests.cs b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/ButtonTests.cs index e6b9b445421..fd8d54e63cf 100644 --- a/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/ButtonTests.cs +++ b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/ButtonTests.cs @@ -130,7 +130,8 @@ await InputSimulator.SendAsync( }); } - [WinFormsFact] + [ActiveIssue("https://github.com/dotnet/winforms/issues/6714")] + [WinFormsFact(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6714")] public async Task Button_AchorNone_NoResizeOnWindowSizeTallerAsync() { await RunTestAsync(async (form, button) => diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewTests.cs index 4ff3cc1c4c5..d0524b887ba 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/DataGridViewTests.cs @@ -1105,9 +1105,8 @@ public static IEnumerable RowHeadersWidth_SetWithHandle_TestData() } } - [ActiveIssue("https://github.com/dotnet/winforms/issues/6597")] - [ConditionalWinFormsTheory(UnsupportedArchitecture = Architecture.Arm64, - Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")] + [ActiveIssue("https://github.com/dotnet/winforms/issues/6739")] + [WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6739")] [MemberData(nameof(RowHeadersWidth_SetWithHandle_TestData))] public void DataGridView_RowHeadersWidth_SetWithHandle_GetReturnsExpected(DataGridViewRowHeadersWidthSizeMode rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue, int expectedInvalidatedCallCount) { @@ -1968,9 +1967,8 @@ public void DataGridView_OnColumnHeadersHeightChanged_Invoke_CallsColumnHeadersH Assert.False(control.IsHandleCreated); } - [ActiveIssue("https://github.com/dotnet/winforms/issues/6597")] - [ConditionalWinFormsTheory(UnsupportedArchitecture = Architecture.Arm64, - Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")] + [ActiveIssue("https://github.com/dotnet/winforms/issues/6926")] + [WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6926")] [MemberData(nameof(OnColumnHeadersHeightChanged_TestData))] public void DataGridView_OnColumnHeadersHeightChanged_InvokeWithHandle_CallsColumnHeadersHeightChanged(DataGridViewColumnHeadersHeightSizeMode columnHeadersWidthSizeMode, bool columnHeadersVisible, EventArgs eventArgs) { diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ToolStripTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ToolStripTests.cs index ea45d94bc6e..0a1060943da 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ToolStripTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ToolStripTests.cs @@ -7121,8 +7121,7 @@ public void ToolStrip_WndProc_InvokeMouseActivate_Success() } [ActiveIssue("https://github.com/dotnet/winforms/issues/6610")] - [ConditionalWinFormsFact(UnsupportedArchitecture = Architecture.Arm64, - Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6610")] + [WinFormsFact(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6610")] public void ToolStrip_WndProc_InvokeMouseActivateWithHandle_Success() { using var control = new SubToolStrip();