Skip to content

Use Assert.Inconclusive for emulator acquisition failures#11110

Open
jonathanpeppers wants to merge 4 commits intomainfrom
jonathanpeppers/dev-peppers-inconclusive-emulator-acquir
Open

Use Assert.Inconclusive for emulator acquisition failures#11110
jonathanpeppers wants to merge 4 commits intomainfrom
jonathanpeppers/dev-peppers-inconclusive-emulator-acquir

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

@jonathanpeppers jonathanpeppers commented Apr 14, 2026

Summary

Emulator acquisition failures in DeviceTest.RestartDevice() are infrastructure issues (unresponsive emulator, boot timeout, Vulkan driver errors), not actual test failures. This changes the assertion from Assert.IsTrue to Assert.Inconclusive so that these tests are marked as skipped/inconclusive rather than turning the build red.

Context

In build 13830308, DotNetInstallAndRunPreviousSdk(True, MonoVM) and DotNetInstallAndRunPreviousSdk(False, NativeAOT) both failed with:

Failed to acquire emulator. Expected: True But was: False

The WearOS emulator was present (emulator-5570) but adb shell echo OK timed out — a pure infrastructure issue that shouldn't mark tests as failed.

Emulator acquisition failures are infrastructure issues, not test
failures. Using Assert.Inconclusive instead of Assert.IsTrue marks
these as skipped/inconclusive rather than turning the build red.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2026 16:26
Copy link
Copy Markdown
Contributor

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

Updates device/emulator test infrastructure so emulator acquisition problems are treated as inconclusive (skipped) rather than hard test failures, reducing CI “red” builds caused by transient emulator/ADB issues.

Changes:

  • Change DeviceTest.RestartDevice() to call Assert.Inconclusive() when AcquireAndroidTarget fails instead of Assert.IsTrue().

jonathanpeppers and others added 2 commits April 14, 2026 12:23
Check LastBuildOutput for known transient patterns before marking
as Inconclusive. Unknown failures still Assert.Fail with the full
build output for investigation.

Transient patterns:
- 'did not finish launching' (boot timeout)
- 'Emulator failed to start' (start failure)
- 'failed to exit within the timeout' (adb timeout)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run Xamarin.Android-PR

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run Xamarin.Android-PR

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants