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

Add retry mechanism for clipboard tests #12229

Open
LeafShi1 opened this issue Sep 26, 2024 · 6 comments · Fixed by #12231
Open

Add retry mechanism for clipboard tests #12229

LeafShi1 opened this issue Sep 26, 2024 · 6 comments · Fixed by #12231
Assignees
Labels
🚧 work in progress Work that is current in progress test-bug Problem in test source code (most likely)

Comments

@LeafShi1
Copy link
Member

LeafShi1 commented Sep 26, 2024

Refer to PR #12087

In order to confirm that clipboard operation can be executing more stable, we consider add retry mechanism for clipboard tests

@LeafShi1 LeafShi1 self-assigned this Sep 26, 2024
@LeafShi1 LeafShi1 added the test-bug Problem in test source code (most likely) label Sep 26, 2024
@dotnet-policy-service dotnet-policy-service bot added the 🚧 work in progress Work that is current in progress label Sep 26, 2024
@JeremyKuhne
Copy link
Member

The right way to handle this is to make sure they are all in the same test collection fixture. Sleeping before testing won't help. This is a place we need a retry mechanism.

@JeremyKuhne
Copy link
Member

Anything using drag/drop APIs also cannot be run asynchronously and should be in the same collection.

@JeremyKuhne
Copy link
Member

[UISettings(MaxAttempts = )] should let you do retries. It was added to Xunit.StaFact last year, need v1.2.46-alpha, which we're already consuming.

@paul1956
Copy link
Contributor

@JeremyKuhne is there a recommend value to MaxAttempts for clipboard tests. All clipboard test are in at least 4 different classes but all Sequential tests are in the one Collection(“Sequential”), this includes unrelated tests for WebBrowser.

@JeremyKuhne
Copy link
Member

3 is probably reasonable to start, but we can go higher in this particular case (OLE).

@LeafShi1 LeafShi1 changed the title Define base class for all clipboard tests and add Thread.Sleep before executing clipboard operations Add retry mechanism for clipboard tests Sep 29, 2024
@Tanya-Solyanik
Copy link
Member

@LeafShi1 - could you please verify if all clipboard tests, even from other test assemblies, are using the same mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 work in progress Work that is current in progress test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants