Browse Source

Run ArrayPoolMemoryAllocatorTests serial

pull/1725/head
Brian Popow 5 years ago
parent
commit
af439841b8
  1. 10
      tests/ImageSharp.Tests/Memory/Allocators/ArrayPoolMemoryAllocatorTests.cs

10
tests/ImageSharp.Tests/Memory/Allocators/ArrayPoolMemoryAllocatorTests.cs

@ -11,6 +11,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Memory.Allocators
{
[Collection("RunSerial")]
public class ArrayPoolMemoryAllocatorTests
{
private const int MaxPooledBufferSizeInBytes = 2048;
@ -56,19 +57,14 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators
[Fact]
public void When_PoolSelectorThresholdInBytes_IsGreaterThan_MaxPooledBufferSizeInBytes_ExceptionIsThrown()
{
Assert.ThrowsAny<Exception>(() => new ArrayPoolMemoryAllocator(100, 200));
}
=> Assert.ThrowsAny<Exception>(() => new ArrayPoolMemoryAllocator(100, 200));
}
[Theory]
[InlineData(32)]
[InlineData(512)]
[InlineData(MaxPooledBufferSizeInBytes - 1)]
public void SmallBuffersArePooled_OfByte(int size)
{
Assert.True(this.LocalFixture.CheckIsRentingPooledBuffer<byte>(size));
}
public void SmallBuffersArePooled_OfByte(int size) => Assert.True(this.LocalFixture.CheckIsRentingPooledBuffer<byte>(size));
[Theory]
[InlineData(128 * 1024 * 1024)]

Loading…
Cancel
Save