From ce7c1151b19f4742fb7ad78a7deb9b951a9f38a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 16:47:52 +0000 Subject: [PATCH] Skip HostTests Moq tests on iossimulator (refs #128405) Castle.DynamicProxy throws IndexOutOfRangeException in BuildProxiedMethodBody on iossimulator-arm64 CoreCLR. These Moq-based tests consistently fail on that platform. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../tests/UnitTests/Internal/HostTests.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs index c345548c3a44c3..c79846bb250052 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs @@ -593,6 +593,7 @@ public async Task HostShutsDownWhenTokenTriggers() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public async Task HostStopAsyncCanBeCancelledEarly() { @@ -625,6 +626,7 @@ public async Task HostStopAsyncCanBeCancelledEarly() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public async Task HostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFire() { @@ -658,6 +660,7 @@ public async Task HostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFire() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public async Task WebHostStopAsyncUsesDefaultTimeoutIfNoTokenProvided() { @@ -1215,6 +1218,7 @@ public async Task Host_InvokesConfigureServicesMethodsOnlyOnce() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public void Dispose_DisposesAppConfigurationProviders() { @@ -1240,6 +1244,7 @@ public void Dispose_DisposesAppConfigurationProviders() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public void Dispose_DisposesHostConfigurationProviders() { @@ -1316,6 +1321,7 @@ public async Task HostCallsDisposeAsyncOnServiceProviderWhenDisposeAsyncCalled() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public async Task DisposeAsync_DisposesAppConfigurationProviders() { @@ -1341,6 +1347,7 @@ public async Task DisposeAsync_DisposesAppConfigurationProviders() } // Moq heavily utilizes RefEmit, which does not work on most aot workloads + [ActiveIssue("https://github.com/dotnet/runtime/issues/128405", TestPlatforms.iOS)] [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public async Task DisposeAsync_DisposesHostConfigurationProviders() {