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

Re-enable skipped test: Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected` #6729

Closed
Tracked by #6690 ...
vladimir-krestov opened this issue Feb 20, 2022 · 3 comments · Fixed by #8864
Labels
area-Clipboard Issues related to Clipboard test-bug Problem in test source code (most likely)

Comments

@vladimir-krestov
Copy link
Contributor

vladimir-krestov commented Feb 20, 2022

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

Problem description:

  • Test fails sometimes in CI build for successful PRs, that blocking deployment of fixes into sdk:
    Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected:
    Stack trace (comment):
Assert.Equal() Failure\r\nExpected: 1\r\nActual:   MemoryStream { CanRead = True, CanSeek = True, CanTimeout = False, CanWrite = True, Capacity = 70, ... }


Stack trace
   at System.Windows.Forms.Tests.ClipboardTests.Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected(Object data, Boolean copy) in /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ClipboardTests.cs:line 279

Expected behavior:

  • All correct tests pass every time.

Minimal repro:

  • Run CI build, it reproduces sometimes
@RussKie RussKie added the test-bug Problem in test source code (most likely) label Feb 21, 2022
@weltkante
Copy link
Contributor

probably related to/duplicate of #3456

Clipboard is a machine-global resource and access needs to be serialized across multiple test classes. While we have a central test class for clipboard tests, there are the occasional API methods which indirectly modify the clipboard, and it will be nontrivial to find all tests that need to be executed sequentially.

@RussKie
Copy link
Member

RussKie commented Mar 15, 2022

We probably ought to move all clipboard related tests to https://github.com/dotnet/winforms/tree/main/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests, as those are run serially.

@RussKie RussKie added the area-Clipboard Issues related to Clipboard label May 5, 2022
@RussKie
Copy link
Member

RussKie commented May 5, 2022

Related to #6269

@Tanya-Solyanik Tanya-Solyanik changed the title Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected is flaky in CI build Re-enable skipped test: Clipboard_SetDataObject_InvokeObjectBoolNotIComDataObject_GetReturnsExpected` Jul 15, 2022
@ghost ghost added the 🚧 work in progress Work that is current in progress label Mar 14, 2023
@ghost ghost removed the 🚧 work in progress Work that is current in progress label Mar 16, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Clipboard Issues related to Clipboard test-bug Problem in test source code (most likely)
Projects
None yet
3 participants