Closed LeafShi1 closed 1 month ago
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.
Anything using drag/drop APIs also cannot be run asynchronously and should be in the same collection.
[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.
@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.
3 is probably reasonable to start, but we can go higher in this particular case (OLE).
@LeafShi1 - could you please verify if all clipboard tests, even from other test assemblies, are using the same mechanism.
Refer to PR #12087
In order to confirm that clipboard operation can be executing more stable, we consider add retry mechanism for clipboard tests