Repository navigation
[flaky-ci] Use embedded jars in desugar test - #12710
Conversation
Avoid downloading the test's existing jar fixtures while materializing the project, so transient Maven feed timeouts cannot fail desugar coverage. Co-authored-by: Copilot App <[email protected]>
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
No code issues found. The five Maven downloads are replaced by existing embedded test resources with the same filenames, and TestResourceFileName supplies their bytes through the project’s established BinaryContent path.
CI is currently red in Package Tests macOS > Tests > APKs 2; the visible MSBuild test lanes relevant to this change passed. Deeper Azure log inspection was unavailable because Azure CLI could not access its required local profile, so I could not classify that package-test failure beyond its unrelated lane.
Generated by Android PR Reviewer for #12710 · gpt56 · 124.6 AIC · ⌖ 9.1 AIC · ⊞ 25.7K
Comment /review to run again
…-dependency-resilience
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is localized to test infrastructure, aligns with the stated goal of removing network dependency for the desugar test, and doesn’t alter the test’s behavioral assertions.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs — 💡 Maintainability — Switching from explicit Maven URLs to embedded resources removes the… |
What changed in this PR
Updates the Desugar build test to use embedded JARs from Xamarin.ProjectTools test resources instead of downloading from the public Maven feed, aiming to reduce CI flakiness while keeping the desugar behavior and assertions unchanged.
Changes:
- Switch the Desugar test’s Okio/OkHttp/Retrofit/Gson JAR inputs from
WebContentdownloads toTestResourceFileNameembedded resources. - Preserve the existing parameterized test matrix and desugar assertions while removing runtime dependency on external Maven access.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs | Updates the Desugar test to load dependency JAR bytes from embedded test resources instead of network downloads. |
| proj.OtherBuildItems.Add (new BuildItem ("AndroidJavaLibrary", "okio-1.13.0.jar") { | ||
| WebContent = $"{TestEnvironment.DotNetPublicMaven}/com/squareup/okio/okio/1.13.0/okio-1.13.0.jar" | ||
| TestResourceFileName = "okio-1.13.0.jar" | ||
| }); | ||
| proj.OtherBuildItems.Add (new BuildItem ("AndroidJavaLibrary", "okhttp-3.8.0.jar") { | ||
| WebContent = $"{TestEnvironment.DotNetPublicMaven}/com/squareup/okhttp3/okhttp/3.8.0/okhttp-3.8.0.jar" | ||
| TestResourceFileName = "okhttp-3.8.0.jar" |
jonathanpeppers
left a comment
There was a problem hiding this comment.
Ok, weird why are we even downloading them if they are checked in...

Summary
Testing
./dotnet-local.sh test bin/TestDebug/net10.0/Xamarin.Android.Build.Tests.dll --filter "Name~Desugar"Tracked by #12704