Skip to content

Commit

Permalink
RavenDB-21321 Fixing test to use an actual page, not just random memory
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Sep 25, 2023
1 parent d000cf1 commit af9c195
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -16,7 +16,6 @@ public unsafe class PostingListLeafPageTests : NoDisposalNeeded
{
private readonly Transaction _tx;
private readonly StorageEnvironment _env;
private ByteStringContext<ByteStringMemoryCache>.InternalScope _releaseStr;
private readonly byte* _pagePtr;
private readonly LowLevelTransaction _llt;

Expand All @@ -25,8 +24,7 @@ public PostingListLeafPageTests(ITestOutputHelper output) : base(output)
_env = new StorageEnvironment(StorageEnvironmentOptions.CreateMemoryOnly());
_tx = _env.WriteTransaction();
_llt = _tx.LowLevelTransaction;
_releaseStr = _tx.Allocator.Allocate(Constants.Storage.PageSize, out var bs);
_pagePtr = bs.Ptr;
_pagePtr = _llt.AllocatePage(1).Pointer;
}

[Theory]
Expand Down Expand Up @@ -178,7 +176,6 @@ public override void Dispose()
{
try
{
_releaseStr.Dispose();
_tx?.Dispose();
_env?.Dispose();
}
Expand Down

0 comments on commit af9c195

Please sign in to comment.