Skip to content

Commit a02b9f4

Browse files
committed
unit test MemoryOwnerDisposalSlicedArray fixed
1 parent b8b7f35 commit a02b9f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

csharp/test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ public async Task MemoryOwnerDisposalSlicedArray(int sliceOffset, int sliceLengt
731731
var slicedBatch = new RecordBatch(originalBatch.Schema, slicedArrays, sliceLength);
732732
var allocator = new TestMemoryAllocator();
733733
await TestRoundTripRecordBatchesAsync(new List<RecordBatch> () {slicedBatch}, null, false, allocator);
734-
Assert.Equal(0,allocator.Statistics.Allocations);
734+
if(sliceOffset % 8 != 0)
735+
Assert.True(allocator.Statistics.Allocations > 0);
735736
Assert.Equal(0,allocator.Rented);
736737
}
737738
}

0 commit comments

Comments
 (0)