Skip to content

Unstable unit test: System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetText_InvokeStringTextDataFormat_GetReturnsExpected(format: Text) #12746

Open

Description

@LeafShi1

Related #11227

Test

System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetText_InvokeStringTextDataFormat_GetReturnsExpected(format: Text)

Issue description

The failure scenario:

System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetText_InvokeStringTextDataFormat_GetReturnsExpected(format: Rtf)

Error Message:

  • In X64 unit:
    • Expected string to be "text" with a length of 4, but "" has a length of 0, differs near "" (index 0).

Stack trace:

   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetText_InvokeStringTextDataFormat_GetReturnsExpected(TextDataFormat format) in /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ClipboardTests.cs:line 506
   at InvokeStub_ClipboardTests.Clipboard_SetText_InvokeStringTextDataFormat_GetReturnsExpected(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Activity

  1. Tanya-Solyanik commented on Jan 10, 2025

    @Tanya-Solyanik
    Contributor

    @LeafShi1 , let's see if this test becomes more stable after Loni's PR is in. She moved one Clipboard test to the sequential collection in #12738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions