Browse Source

Disable MemoryAllocator tests

pull/2384/head
Stefan Nikolei 3 years ago
parent
commit
56de9e766b
  1. 4
      tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs
  2. 4
      tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs
  3. 40
      tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs

4
tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs

@ -53,11 +53,11 @@ public partial class UniformUnmanagedMemoryPoolTests
[Collection(nameof(NonParallelCollection))] [Collection(nameof(NonParallelCollection))]
public class NonParallel public class NonParallel
{ {
// public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS; public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS;
// TODO: Investigate failures on macOS. All handles are released after GC. // TODO: Investigate failures on macOS. All handles are released after GC.
// (It seems to happen more consistently on .NET 6.) // (It seems to happen more consistently on .NET 6.)
// [ConditionalFact(nameof(IsNotMacOS))] [ConditionalFact(nameof(IsNotMacOS))]
[Fact] [Fact]
public void MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed() public void MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed()
{ {

4
tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.cs

@ -238,10 +238,10 @@ public partial class UniformUnmanagedMemoryPoolTests
cleanup.Register(b1); cleanup.Register(b1);
} }
// public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS; public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS;
// TODO: Investigate macOS failures // TODO: Investigate macOS failures
// [ConditionalTheory(nameof(IsNotMacOS))] [ConditionalTheory(nameof(IsNotMacOS))]
[InlineData(false)] [InlineData(false)]
[InlineData(true)] [InlineData(true)]
public void RentReturnRelease_SubsequentRentReturnsDifferentHandles(bool multiple) public void RentReturnRelease_SubsequentRentReturnsDifferentHandles(bool multiple)

40
tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedPoolMemoryAllocatorTests.cs

@ -255,11 +255,11 @@ public class UniformUnmanagedPoolMemoryAllocatorTests
[InlineData(1200)] // Group of two UniformUnmanagedMemoryPool buffers [InlineData(1200)] // Group of two UniformUnmanagedMemoryPool buffers
public void AllocateMemoryGroup_Finalization_ReturnsToPool(int length) public void AllocateMemoryGroup_Finalization_ReturnsToPool(int length)
{ {
// if (TestEnvironment.IsMacOS) if (TestEnvironment.IsMacOS)
// { {
// // Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887 // Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887
// return; return;
// } }
if (TestEnvironment.OSArchitecture == Architecture.Arm64) if (TestEnvironment.OSArchitecture == Architecture.Arm64)
{ {
@ -267,12 +267,12 @@ public class UniformUnmanagedPoolMemoryAllocatorTests
return; return;
} }
// if (!TestEnvironment.RunsOnCI) if (!TestEnvironment.RunsOnCI)
// { {
// // This may fail in local runs resulting in high memory load. // This may fail in local runs resulting in high memory load.
// // Remove the condition for local debugging! // Remove the condition for local debugging!
// return; return;
// } }
// RunTest(length.ToString()); // RunTest(length.ToString());
RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose(); RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose();
@ -323,18 +323,24 @@ public class UniformUnmanagedPoolMemoryAllocatorTests
[InlineData(600)] // Group of single UniformUnmanagedMemoryPool buffer [InlineData(600)] // Group of single UniformUnmanagedMemoryPool buffer
public void AllocateSingleMemoryOwner_Finalization_ReturnsToPool(int length) public void AllocateSingleMemoryOwner_Finalization_ReturnsToPool(int length)
{ {
if (TestEnvironment.IsMacOS)
{
// Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887
return;
}
if (TestEnvironment.OSArchitecture == Architecture.Arm64) if (TestEnvironment.OSArchitecture == Architecture.Arm64)
{ {
// Skip on ARM64: https://github.com/SixLabors/ImageSharp/issues/2342 // Skip on ARM64: https://github.com/SixLabors/ImageSharp/issues/2342
return; return;
} }
// if (!TestEnvironment.RunsOnCI) if (!TestEnvironment.RunsOnCI)
// { {
// // This may fail in local runs resulting in high memory load. // This may fail in local runs resulting in high memory load.
// // Remove the condition for local debugging! // Remove the condition for local debugging!
// return; return;
// } }
// RunTest(length.ToString()); // RunTest(length.ToString());
RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose(); RemoteExecutor.Invoke(RunTest, length.ToString()).Dispose();

Loading…
Cancel
Save