Skip to content

Commit e1979b7

Browse files
eduardo-vpEduardo Velarde
andauthored
Update OutOfMemoryException test (#130146)
I think the test is not GC stress compatible. The small allocations loops finish earlier than expected because of the allocations done by the GC and all the final loop can just finish instead of OOMing. https://github.com/dotnet/runtime/blob/57fc9dc8acd841ecffb733faf8def2cd96fadfd0/src/tests/baseservices/exceptions/OutOfMemoryException/OutOfMemoryException.cs#L32-L44 Fixes #129159. Co-authored-by: Eduardo Velarde <evelardepola@microsoft.com>
1 parent fe5e473 commit e1979b7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/tests/baseservices/exceptions/OutOfMemoryException/OutOfMemoryException.csproj‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<CLRTestTargetUnsupported Condition="'$(TargetsOSX)' == 'true' and '$(TargetArchitecture)' == 'x64'">true</CLRTestTargetUnsupported>
99
<RequiresProcessIsolation>true</RequiresProcessIsolation>
1010
<ReferenceXUnitWrapperGenerator>false</ReferenceXUnitWrapperGenerator>
11+
<!-- GCStress runs collections very frequently and allocates its own objects, which changes
12+
when the program runs out of memory. As a result the small allocations test becomes unreliable. -->
13+
<GCStressIncompatible>true</GCStressIncompatible>
1114
<!-- Mono doesn't enforce DOTNET_GCHeapHardLimit as a GC heap limit -->
1215
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'mono'">true</DisableProjectBuild>
1316
</PropertyGroup>

0 commit comments

Comments
 (0)