Skip to content

Some RichTextBox tests are flaky in x86 and x64 Debug CI build #6609

Closed
@vladimir-krestov

Description

@vladimir-krestov
  • .NET Core Version: 7.0

  • Have you experienced this same bug with .NET Framework?: No

Problem description:
Tests fails sometime in x86 and x64 CI build for successful PRs, that blocking deployment of fixes into sdk:

System.Windows.Forms.Tests.RichTextBoxTests.RichTextBox_Text_GetWithHandle_ReturnsExpected [FAIL]
      Assert.Equal() Failure
                (pos 0)
      Expected: a?b
      Actual:   ?b
                (pos 0)
      Stack Trace:
        /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/RichTextBoxTests.cs(6920,0): at System.Windows.Forms.Tests.RichTextBoxTests.RichTextBox_Text_GetWithHandle_ReturnsExpected()
  • (x64) RichTextBox_Click_On_Custom_Link_Followed_By_Hidden_Text_Provides_Displayed_Link_SpanAsync:
    Stack trace (buildId=1621721):
    Assert.InRange() Failure\r\nRange:  (243 - 245)\r\nActual: 5
    at System.Windows.Forms.UITests.ControlTestBase.MoveMouseAsync(Form window, Point point, Boolean assertCorrectLocation) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs:line 148
    at System.Windows.Forms.UITests.RichTextBoxTests.<RichTextBox_Click_On_Custom_Link_Followed_By_Hidden_Text_Provides_Displayed_Link_SpanAsync>b__5_0(Form form, RichTextBox richTextBox) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/RichTextBoxTests.cs:line 209
    at System.Windows.Forms.UITests.RichTextBoxTests.<RichTextBox_Click_On_Custom_Link_Followed_By_Hidden_Text_Provides_Displayed_Link_SpanAsync>b__5_0(Form form, RichTextBox richTextBox) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/RichTextBoxTests.cs:line 227
    at System.Windows.Forms.UITests.ControlTestBase.<>c__DisplayClass27_0`1.<<RunFormAsync>b__0>d.MoveNext() in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs:line 236
    
    at Microsoft.VisualStudio.Threading.JoinableTask.JoinAsync(CancellationToken cancellationToken)
    at System.Windows.Forms.UITests.ControlTestBase.RunFormAsync[T](Func`1 createDialog, Func`3 testDriverAsync) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs:line 255
    at System.Windows.Forms.UITests.ControlTestBase.RunSingleControlTestAsync[T](Func`3 testDriverAsync, Func`1 createControl, Func`1 createForm) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Infra/ControlTestBase.cs:line 173
    at System.Windows.Forms.UITests.RichTextBoxTests.RunTestAsync(Func`3 runTest) in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/RichTextBoxTests.cs:line 317
    at System.Windows.Forms.UITests.RichTextBoxTests.RichTextBox_Click_On_Custom_Link_Followed_By_Hidden_Text_Provides_Displayed_Link_SpanAsync() in /_/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/RichTextBoxTests.cs:line 175
    
    

Expected behavior:
All correct tests pass every time.

Minimal repro:

  • Run unit tests on x86/x64 environment (or create a PR with changes, CI build will do it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    test-bugProblem in test source code (most likely)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions