Skip to content

Commit 482c8f9

Browse files
anandhan-rajagopalrmarinho
authored andcommitted
fix for flaky tests (#30088)
1 parent fbddfcb commit 482c8f9

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/Controls/tests/TestCases.Shared.Tests/Tests/DragAndDropUITests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ public void PlatformDragEventArgs()
161161
App.WaitForElement("LabelDragElement");
162162
App.DragAndDrop("LabelDragElement", "DragTarget");
163163

164+
// Add an additional drag and drop to avoid the flakiness in CI.
165+
App.DragAndDrop("LabelDragElement", "DragTarget");
166+
164167
App.WaitForElement("DragStartEventsLabel");
165168
var textAfterDragStart = App.FindElement("DragStartEventsLabel").GetText();
166169

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ public Issue8870(TestDevice testDevice) : base(testDevice)
2020
[Category(UITestCategories.CollectionView)]
2121
[FailsOnMacWhenRunningOnXamarinUITest("SetOrientationPortrait method not implemented")]
2222
[FailsOnWindowsWhenRunningOnXamarinUITest("SetOrientationPortrait method not implemented")]
23-
public async Task RotatingCollectionViewWithHTMLShouldNotHangOrCrash()
23+
public void RotatingCollectionViewWithHTMLShouldNotHangOrCrash()
2424
{
25-
int delay = 3000;
25+
int delay = 1000;
2626

2727
App.WaitForElement(CheckResult);
2828

2929
App.SetOrientationPortrait();
30-
await Task.Delay(delay);
30+
Thread.Sleep(delay);
3131

3232
App.SetOrientationLandscape();
33-
await Task.Delay(delay);
33+
Thread.Sleep(delay);
3434

3535
App.SetOrientationPortrait();
36-
await Task.Delay(delay);
36+
Thread.Sleep(delay);
3737

3838
App.SetOrientationLandscape();
39-
await Task.Delay(delay);
39+
Thread.Sleep(delay);
4040

4141
App.SetOrientationPortrait();
42-
await Task.Delay(delay);
42+
Thread.Sleep(delay);
4343

4444
App.WaitForElement(CheckResult);
4545
App.Tap(CheckResult);

0 commit comments

Comments
 (0)