diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs index 2ab3c973a..f748b7feb 100644 --- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs +++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs @@ -65,6 +65,13 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators [ConditionalFact(nameof(IsNotMacOs))] public void MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed() { + if (!TestEnvironment.RunsOnCI) + { + // This may fail in local runs resulting in high memory load. + // Remove the condition for local debugging! + return; + } + RemoteExecutor.Invoke(RunTest).Dispose(); static void RunTest() diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs index f7893ec64..cc6632af1 100644 --- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs +++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs @@ -259,6 +259,13 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators [InlineData(1200)] // Group of two UniformUnmanagedMemoryPool buffers public void MemoryGroupFinalizer_ReturnsToPool(int length) { + if (!TestEnvironment.RunsOnCI) + { + // This may fail in local runs resulting in high memory load. + // Remove the condition for local debugging! + return; + } + // RunTest(length.ToString()); RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose(); @@ -308,6 +315,13 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators [InlineData(600)] // Group of single UniformUnmanagedMemoryPool buffer public void MemoryOwnerFinalizer_ReturnsToPool(int length) { + if (!TestEnvironment.RunsOnCI) + { + // This may fail in local runs resulting in high memory load. + // Remove the condition for local debugging! + return; + } + // RunTest(length.ToString()); RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose();