Skip to content

Commit

Permalink
Added "Skip" attribute for unit tests,
Browse files Browse the repository at this point in the history
that fail sometimes in arm64 and x86 environments, that blocks fixes deployment
Related Issue dotnet#6597
  • Loading branch information
vladimir-krestov committed Feb 3, 2022
1 parent 7df977d commit eabcbe6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ public static IEnumerable<object[]> ColumnHeadersHeight_SetWithHandle_TestData()
}
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(ColumnHeadersHeight_SetWithHandle_TestData))]
public void DataGridView_ColumnHeadersHeight_SetWithHandle_GetReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersWidthSizeMode, bool columnHeadersVisible, bool autoSize, int value, int expectedValue, int expectedInvalidatedCallCount)
{
Expand Down Expand Up @@ -236,7 +237,8 @@ public static IEnumerable<object[]> ColumnHeadersHeight_SetWithParentWithHandle_
}
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(ColumnHeadersHeight_SetWithParentWithHandle_TestData))]
public void DataGridView_ColumnHeadersHeight_SetWithParentWithHandle_GetReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersWidthSizeMode, bool columnHeadersVisible, bool autoSize, int value, int expectedValue, int expectedInvalidatedCallCount, int expectedLayoutCallCount, int expectedParentLayoutCallCount)
{
Expand Down Expand Up @@ -524,7 +526,8 @@ public static IEnumerable<object[]> ColumnHeadersHeightSizeMode_SetWithHandle_Te
yield return new object[] { false, DataGridViewColumnHeadersHeightSizeMode.EnableResizing, DefaultColumnHeadersHeight, 0 };
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(ColumnHeadersHeightSizeMode_SetWithHandle_TestData))]
public void DataGridView_ColumnHeadersHeightSizeMode_SetWithHandle_GetReturnsExpected(bool columnHeadersVisible, DataGridViewColumnHeadersHeightSizeMode value, int expectedColumnHeadersHeight, int expectedInvalidatedCallCount)
{
Expand Down Expand Up @@ -558,7 +561,8 @@ public void DataGridView_ColumnHeadersHeightSizeMode_SetWithHandle_GetReturnsExp
Assert.Equal(0, createdCallCount);
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[InlineData(DataGridViewColumnHeadersHeightSizeMode.DisableResizing, DataGridViewColumnHeadersHeightSizeMode.AutoSize)]
[InlineData(DataGridViewColumnHeadersHeightSizeMode.EnableResizing, DataGridViewColumnHeadersHeightSizeMode.AutoSize)]
public void DataGridView_ColumnHeadersHeightSizeMode_SetNonResizeThenResize_RestoresOldValue(DataGridViewColumnHeadersHeightSizeMode originalColumnHeadersHeightSizeMode, DataGridViewColumnHeadersHeightSizeMode value)
Expand Down Expand Up @@ -1096,7 +1100,8 @@ public static IEnumerable<object[]> RowHeadersWidth_SetWithHandle_TestData()
}
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(RowHeadersWidth_SetWithHandle_TestData))]
public void DataGridView_RowHeadersWidth_SetWithHandle_GetReturnsExpected(DataGridViewRowHeadersWidthSizeMode rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue, int expectedInvalidatedCallCount)
{
Expand Down Expand Up @@ -1462,7 +1467,8 @@ public static IEnumerable<object[]> RowHeadersWidthSizeMode_SetWithHandle_TestDa
yield return new object[] { false, DataGridViewRowHeadersWidthSizeMode.EnableResizing, DefaultRowHeadersWidth, 0 };
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(RowHeadersWidthSizeMode_SetWithHandle_TestData))]
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandle_GetReturnsExpected(bool rowHeadersVisible, DataGridViewRowHeadersWidthSizeMode value, int expectedRowHeadersWidth, int expectedInvalidatedCallCount)
{
Expand Down Expand Up @@ -1496,7 +1502,8 @@ public void DataGridView_RowHeadersWidthSizeMode_SetWithHandle_GetReturnsExpecte
Assert.Equal(0, createdCallCount);
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[InlineData(DataGridViewRowHeadersWidthSizeMode.DisableResizing, DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders)]
[InlineData(DataGridViewRowHeadersWidthSizeMode.DisableResizing, DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders)]
[InlineData(DataGridViewRowHeadersWidthSizeMode.DisableResizing, DataGridViewRowHeadersWidthSizeMode.AutoSizeToFirstHeader)]
Expand Down Expand Up @@ -1952,7 +1959,8 @@ public void DataGridView_OnColumnHeadersHeightChanged_Invoke_CallsColumnHeadersH
Assert.False(control.IsHandleCreated);
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(OnColumnHeadersHeightChanged_TestData))]
public void DataGridView_OnColumnHeadersHeightChanged_InvokeWithHandle_CallsColumnHeadersHeightChanged(DataGridViewColumnHeadersHeightSizeMode columnHeadersWidthSizeMode, bool columnHeadersVisible, EventArgs eventArgs)
{
Expand Down Expand Up @@ -2429,7 +2437,8 @@ public void DataGridView_OnRowHeadersWidthChanged_Invoke_CallsRowHeadersWidthCha
Assert.False(control.IsHandleCreated);
}

[WinFormsTheory]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6597")]
[WinFormsTheory(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6597")]
[MemberData(nameof(OnRowHeadersWidthChanged_TestData))]
public void DataGridView_OnRowHeadersWidthChanged_InvokeWithHandle_CallsRowHeadersWidthChanged(DataGridViewRowHeadersWidthSizeMode rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6875,7 +6875,8 @@ public static IEnumerable<object[]> RichTextBox_Text_GetWithHandle_TestData()

// NOTE: do not convert this into a theory as it will run hundreds of tests
// and with that will cycle through hundreds of UI controls.
[WinFormsFact]
[ActiveIssue("https://github.com/dotnet/winforms/issues/6609")]
[WinFormsFact(Skip = "Flaky tests, see: https://github.com/dotnet/winforms/issues/6609")]
public void RichTextBox_Text_GetWithHandle_ReturnsExpected()
{
using (var control = new RichTextBox())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7118,7 +7118,8 @@ public void ToolStrip_WndProc_InvokeMouseActivate_Success()
Assert.True(control.IsHandleCreated);
}

[WinFormsFact]
[ActiveIssue("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();
Expand Down

0 comments on commit eabcbe6

Please sign in to comment.