winforms
winforms copied to clipboard
DataGridView Flaky tests due to invalidatedCallCount
Test
DataGridView_ColumnHeadersHeightSizeMode_SetNonResizeThenResize_RestoresOldValue DataGridView_ColumnHeadersHeightSizeMode_SetWithHandle_GetReturnsExpected DataGridView_ColumnHeadersHeight_SetWithHandle_GetReturnsExpected DataGridView_ColumnHeadersHeight_SetWithParentWithHandle_GetReturnsExpected DataGridView_OnColumnHeadersHeightChanged_InvokeWithHandle_CallsColumnHeadersHeightChanged DataGridView_OnColumnHeadersHeightSizeModeChanged_InvokeWithHandle_CallsColumnHeadersHeightSizeModeChanged DataGridView_OnRowHeadersWidthChanged_InvokeWithHandle_CallsRowHeadersWidthChanged DataGridView_OnRowHeadersWidthSizeModeChanged_InvokeWithHandle_CallsRowHeadersWidthSizeModeChanged DataGridView_Parent_SetWithHandle_GetReturnsExpected DataGridView_RowHeadersWidthSizeMode_SetNonResizeThenResize_RestoresOldValue DataGridView_RowHeadersWidthSizeMode_SetWithHandle_GetReturnsExpected DataGridView_RowHeadersWidth_SetWithHandle_GetReturnsExpected DataGridView_RowHeadersWidth_SetWithParentWithHandle_GetReturnsExpected DataGridView_TopLeftHeaderCell_GetWithHandle_ReturnsExpected DataGridView_TopLeftHeaderCell_SetWithHandle_GetReturnsExpected
Issue description
All these tests may randomly fail due to extra invalidations. This happens when the mouse pointer is above any cell of DataGridView. We can't properly fix this now because of:
- UTs are run in parallel therefore we can't set the mouse pointer and guarantee that it will not be moved until the test is done.
- DataGridView without columns does not visually display the left top header, but still tries to invalidate it's area.
Affected issues: https://github.com/dotnet/winforms/issues/6597 It's hard to say if they are all, but probably yes. https://github.com/dotnet/winforms/issues/6739 https://github.com/dotnet/winforms/issues/6926
This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
@dmitrii-drobotov can anyone on your team take a look at this flaky test issue? It might be good to get it on the backlog.
@merriemcgaw
@dmitrii-drobotov can anyone on your team take a look at this flaky test issue? It might be good to get it on the backlog.
We already discussed it here and had a plan. But I really don't know when I can get to it 😔
@kirsan31 - thank you for the context. I will add it to our backlog, maybe someone on the team will be able to take a look as well.
@kirsan31 - sorry I missed that, my bad! I will let you and @dmitrii-drobotov figure out which one of you can get to it first and go from there. We always appreciate the community pitching in, especially with some of the things we know the feature team can't quite get to. Thanks for being such a great contributor!
Extra invalidation in given tests will be commented out (with reference to this Issue as was proposed by @RussKie).
@dreddy-work - how do you feel about having commented out code in tests? I'm against it because the issue is already documenting the problem. I would remove the unused code and data and keep the reference to the issue.
@dreddy-work - how do you feel about having commented out code in tests? I'm against it because the issue is already documenting the problem. I would remove the unused code and data and keep the reference to the issue.
That seems appropriate to me to stay away from commented out code in tests when we have issues to document whatever the problem is.