Skip to content

[Net11]Skip request-interception tests that hit echo.free.beeceptor.com#36020

Merged
PureWeen merged 1 commit into
dotnet:net11.0from
BagavathiPerumal:skip-blazorwebview-https-interception-tests
Jun 19, 2026
Merged

[Net11]Skip request-interception tests that hit echo.free.beeceptor.com#36020
PureWeen merged 1 commit into
dotnet:net11.0from
BagavathiPerumal:skip-blazorwebview-https-interception-tests

Conversation

@BagavathiPerumal

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Several request-interception device tests were running an [InlineData("https://echo.free.beeceptor.com/...")] row on Windows and Android Helix queues even though that external service is known to be flaky (tracked in #33927). The sibling tests in the same files already skip that scenario; these four were missed:

  • BlazorWebViewTests.RequestsCanBeInterceptedAndCustomDataReturnedForDifferentHosts
  • BlazorWebViewTests.RequestsCanBeInterceptedAndCancelledForDifferentHosts
  • BlazorWebViewTests.RequestsCanBeInterceptedAndCaseInsensitiveHeadersRead
  • HybridWebViewTests_Interception.RequestsCanBeInterceptedAndCancelledForDifferentHosts

Reflection on the built Microsoft.Maui.Controls.DeviceTests.dll (net10.0-windows10.0.19041.0) confirmed each of these methods had a Microsoft.Maui.TheoryAttribute with no Skip and the https://echo.free.beeceptor.com/ InlineData attached — they would attempt a real outbound TLS request from the Helix worker whenever interception did not fire.

Fix

Split the single [Theory] into two: one inside the #if !ANDROID && !WINDOWS block (paired with the app://echoservice/ row) and one inside the #if !IOS && !MACCATALYST block carrying Skip = "Flaky due to external service dependency (echo.free.beeceptor.com). See https://github.com/dotnet/maui/issues/33927" (paired with the https:// row).

This matches the convention already used by the three other sibling methods (CustomDataReturned, HeadersAdded, CaseInsensitiveHeadersRead in HybridWebViewTests_Interception.cs).

Importantly, iOS / MacCatalyst coverage is preserved — only the https:// rows are skipped. The app://echoservice/ rows are fully self-contained (the OS cannot resolve the app:// scheme, so the request never touches the network — it is satisfied entirely by the WebResourceRequested handler inside the test).

Per-TFM safety check

The custom Microsoft.Maui.TheoryAttribute has AllowMultiple = false, and the #if guards make the two [Theory] attributes mutually exclusive across every TFM in MauiDeviceTestsPlatforms:

TFM [Theory] (app://) [Theory(Skip)] (https://)
net10.0-android excluded included
net10.0-windows10.x excluded included
net10.0-ios included excluded
net10.0-maccatalyst included excluded

Issues Fixed

Related to #33927.

Note: Created a backport PR for the net11 branch based on the changes introduced in the main PR (#35661).

…e BlazorWebView interception tests (CustomDataReturned, Cancelled, and CaseInsensitiveHeadersRead) and one HybridWebView interception test (Cancelled) were running against the https://echo.free.beeceptor.com/ InlineData on the Windows and Android Helix queues, even though the same external service is already known to be flaky and is skipped in other sibling tests (see dotnet#33927 and dotnet#32400). Split the [Theory] attributes so that the iOS/MacCatalyst app:// scheme variants continue to run, while only the https:// variants that depend on the external echo service are skipped.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36020

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36020"

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 19, 2026
@github-actions github-actions Bot added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Jun 19, 2026
@vishnumenon2684
vishnumenon2684 marked this pull request as ready for review June 19, 2026 12:53
@kubaflo

kubaflo commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

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

Labels

area-blazor Blazor Hybrid / Desktop, BlazorWebView partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants