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))]
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.
// (It seems to happen more consistently on .NET 6.)
// [ConditionalFact(nameof(IsNotMacOS))]
[ConditionalFact(nameof(IsNotMacOS))]
[Fact]
public void MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed()
{

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

@ -238,10 +238,10 @@ public partial class UniformUnmanagedMemoryPoolTests
cleanup.Register(b1);
}
// public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS;
public static readonly bool IsNotMacOS = !TestEnvironment.IsMacOS;
// TODO: Investigate macOS failures
// [ConditionalTheory(nameof(IsNotMacOS))]
[ConditionalTheory(nameof(IsNotMacOS))]
[InlineData(false)]
[InlineData(true)]
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
public void AllocateMemoryGroup_Finalization_ReturnsToPool(int length)
{
// if (TestEnvironment.IsMacOS)
// {
// // Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887
// return;
// }
if (TestEnvironment.IsMacOS)
{
// Skip on macOS: https://github.com/SixLabors/ImageSharp/issues/1887
return;
}
if (TestEnvironment.OSArchitecture == Architecture.Arm64)
{
@ -267,12 +267,12 @@ public class UniformUnmanagedPoolMemoryAllocatorTests
return;
}
// if (!TestEnvironment.RunsOnCI)
// {
// // This may fail in local runs resulting in high memory load.
// // Remove the condition for local debugging!
// return;
// }
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();
@ -323,18 +323,24 @@ public class UniformUnmanagedPoolMemoryAllocatorTests
[InlineData(600)] // Group of single UniformUnmanagedMemoryPool buffer
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)
{
// Skip on ARM64: https://github.com/SixLabors/ImageSharp/issues/2342
return;
}
// if (!TestEnvironment.RunsOnCI)
// {
// // This may fail in local runs resulting in high memory load.
// // Remove the condition for local debugging!
// return;
// }
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();

Loading…
Cancel
Save