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

[Testing] Fix randomly failing tests on CI #26120

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Changes to fix randomly failing tests on CI. The failing tests are:

  • GradientImageButtonBackground
  • ImageButtonAspectFitWorks
  • Issue18896Test

@jsuarezruiz jsuarezruiz requested a review from a team as a code owner November 26, 2024 09:17
@@ -104,16 +104,17 @@ public override void Reset()
App.ResetApp();
}

public void VerifyScreenshot(string? name = null)
public void VerifyScreenshot(string? name = null, TimeSpan? retryDelay = null)
Copy link
Contributor Author

@jsuarezruiz jsuarezruiz Nov 26, 2024

Choose a reason for hiding this comment

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

Allow to set the retry waiting time verifying snapshots.

@jsuarezruiz
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR2 milestone Nov 26, 2024
@PureWeen PureWeen self-assigned this Nov 26, 2024
@jsuarezruiz jsuarezruiz marked this pull request as draft November 26, 2024 15:20
VerifyScreenshot();

Thread.Sleep(1000);
VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2));
Copy link
Member

Choose a reason for hiding this comment

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

I think we just build this retry into VertifyScreenshot by default for Android so we don't have to pass it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, just increase the waiting time between snapshots.

@jsuarezruiz jsuarezruiz marked this pull request as ready for review November 27, 2024 14:50
@jsuarezruiz jsuarezruiz requested a review from PureWeen November 27, 2024 15:16
@@ -1,4 +1,4 @@
#if ANDROID
#if ANDROID && TEST_FAILS_ON_ANDROID // Related issue: https://github.com/dotnet/maui/issues/26159
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a new related issue

@rmarinho rmarinho merged commit ccc35cd into main Nov 28, 2024
107 checks passed
@rmarinho rmarinho deleted the uitest-fix-randomly-failing-tests branch November 28, 2024 12:35
@jsuarezruiz jsuarezruiz restored the uitest-fix-randomly-failing-tests branch November 28, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants