-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
.NET Core Version:
master
Have you experienced this same bug with .NET Framework?:
no
Problem description:
Noticed as a flaky test:
System.Windows.Forms.Tests.TextBoxBaseTests.TextBoxBase_Paste_InvokeNotEmpty_Success [FAIL]
Assert.Equal() Failure
� (pos 1)
Expected: abc
Actual: a
� (pos 1)
Stack Trace:
F:\workspace_work\1\s\src\System.Windows.Forms\tests\UnitTests\TextBoxBaseTests.cs(5957,0): at System.Windows.Forms.Tests.TextBoxBaseTests.TextBoxBase_Paste_InvokeNotEmpty_Success()
Test seems to assume clipboard is empty/nonfunctional (there is at least one more test along these, should review for more clipboard-dependent tests)
Also any clipboard tests need to be [Collection("Sequential")] to avoid overlapping with other clipboard tests. Is it worth making the whole test class sequential just due to that single test? should the test be moved?
Expected behavior:
Clipboard based tests initialize clipboard to be in known state and are marked for sequential execution
Minimal repro:
none, flaky test