Skip to content

[Flaky test] InstallAndroidDependenciesTest (GoogleV2/Xamarin, CoreCLR) fails intermittently across PRs #11973

Description

@simonrozsival

Affected test

Xamarin.Android.Build.Tests.AndroidDependenciesTests.InstallAndroidDependenciesTest

Both parameter combinations that exercise the network-dependent SDK/JDK install path have been observed failing intermittently across multiple, unrelated PRs:

  • InstallAndroidDependenciesTest("GoogleV2", CoreCLR)
  • InstallAndroidDependenciesTest("Xamarin", CoreCLR)

Description

These tests fail randomly (not tied to any specific code change) on the public dnceng-public dotnet-android CI pipeline. The InstallAndroidDependencies target downloads/installs the Android SDK and JDK from a manifest, so the test is inherently sensitive to network flakiness and manifest availability.

The failures are short (2–4 s) and manifest as a generic build failure, e.g.:

Failed InstallAndroidDependenciesTest("GoogleV2",CoreCLR) [4 s]
  Error Message:
   Xamarin.ProjectTools.FailedBuildException : Build failure: UnnamedProject.csproj
   Build log recorded at .../temp/InstallAndroidDependenciesTestGoogleV2CoreCLR/install-deps.log
  Stack Trace:
     at Xamarin.ProjectTools.Builder.BuildInternal(...) in Common/Builder.cs:line 417
     at Xamarin.ProjectTools.ProjectBuilder.Build(...) in Common/ProjectBuilder.cs:line 134
     at Xamarin.Android.Build.Tests.AndroidDependenciesTests.InstallAndroidDependenciesTest(String manifestType, AndroidRuntime runtime) in AndroidDependenciesTests.cs:line 72
Failed InstallAndroidDependenciesTest("Xamarin",CoreCLR) [2 s]
  Error Message:
   Xamarin.ProjectTools.FailedBuildException : Build failure: UnnamedProject.csproj
   Build log recorded at .../temp/InstallAndroidDependenciesTestXamarinCoreCLR/install-deps.log

Command that is run under the test:

dotnet build UnnamedProject.csproj /t:InstallAndroidDependencies /noconsolelogger \
  "/flp1:LogFile=.../install-deps.log;Encoding=UTF-8;Verbosity=detailed" -nodeReuse:false @".../project.rsp"

Source

Notes / next steps

  • The full failure reason lives in the per-test install-deps.log artifact, which is not surfaced in the test output above. Collecting that log from a failing run will confirm whether this is a transient download/network failure vs. a real regression.
  • If confirmed to be network flakiness, consider adding a retry around the InstallAndroidDependencies invocation or marking the test with a known-flaky annotation.

Tracking issue to correlate these intermittent failures across PRs.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions