Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LeafShi1 opened this issue Jan 10, 2025 · 1 comment

Comments

@LeafShi1
Copy link
Member

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)
@Tanya-Solyanik
Copy link
Member

Tanya-Solyanik commented Jan 10, 2025

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants