Skip to content

[Testing] Fix for flaky UITests (PlatformDragEventArgs & Issue8870) in CI that occasionally fails #30088

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

Merged
merged 1 commit into from
Jun 21, 2025

Conversation

anandhan-rajagopal
Copy link
Contributor

This pull request includes updates to test cases to improve reliability and performance in the DragAndDropUITests and Issue8870 tests. The changes address flakiness in drag-and-drop operations and optimize delays during orientation changes.

Build Link: https://dev.azure.com/xamarin/public/_build/results?buildId=144524&view=ms.vss-test-web.build-test-results-tab&runId=4381475&resultId=100039&paneView=attachments

Test Cases

@Copilot Copilot AI review requested due to automatic review settings June 20, 2025 10:53
@anandhan-rajagopal anandhan-rajagopal requested a review from a team as a code owner June 20, 2025 10:53
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 20, 2025
Copy link
Contributor

Hey there @@anandhan-rajagopal! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 20, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes flaky UITests by adjusting the delay durations and replacing asynchronous delays with synchronous sleeps for improved reliability and performance.

  • In Issue8870 tests, the delay duration is reduced from 3000ms to 1000ms and asynchronous delays (Task.Delay) are replaced with Thread.Sleep.
  • In DragAndDropUITests, an additional drag-and-drop operation is added to mitigate CI flakiness.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue8870.cs Reduced delays and changed async method to synchronous method.
src/Controls/tests/TestCases.Shared.Tests/Tests/DragAndDropUITests.cs Added a duplicate drag-and-drop step to reduce flakiness.
Comments suppressed due to low confidence (1)

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue8870.cs:23

  • [nitpick] Changing the test signature from async Task to void removes the asynchronous exception handling normally provided by the testing framework. Please confirm that the test runner properly captures exceptions with this synchronous approach.
		public void RotatingCollectionViewWithHTMLShouldNotHangOrCrash()

@anandhan-rajagopal anandhan-rajagopal added the area-testing Unit tests, device tests label Jun 20, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen merged commit 7e82b00 into dotnet:main Jun 21, 2025
78 checks passed
rmarinho pushed a commit that referenced this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants