Skip to content

Commit

Permalink
RavenDB-22986 - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha-kotler committed Nov 21, 2024
1 parent 68ad77e commit 2068cb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/FastTests/Voron/Trees/FreeSpaceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void CanGetListOfAllFreedPages(int maxPageNumber, int numberOfFreedPages,
public void CanUpdateMaxConsecutiveRanges()
{
const int totalSections = 4;
const int totalPages = 2048 * totalSections;
const int totalPages = FreeSpaceHandling.NumberOfPagesInSection * totalSections;

using (var tx = Env.WriteTransaction())
{
Expand All @@ -273,7 +273,7 @@ public void CanUpdateMaxConsecutiveRanges()
const int lastPageInAllSections = totalPages - 1;
using (var tx = Env.WriteTransaction())
{
for (int i = 0; i < totalPages; i += 2048)
for (int i = 0; i < totalPages; i += FreeSpaceHandling.NumberOfPagesInSection)
{
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, i);
}
Expand Down Expand Up @@ -331,7 +331,7 @@ public void CanUpdateMaxConsecutiveRanges()

using (var tx = Env.WriteTransaction())
{
for (int i = 0; i < totalPages; i += 2048)
for (int i = 0; i < totalPages; i += FreeSpaceHandling.NumberOfPagesInSection)
{
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, i + 2);
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, i + 4);
Expand Down Expand Up @@ -379,7 +379,7 @@ public void CanUpdateMaxConsecutiveRanges()
{
// releasing from sections 0 and 2 - this should clear the in memory state for those sections
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, 3);
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, 2048 * 2 + 15);
Env.FreeSpaceHandling.FreePage(tx.LowLevelTransaction, FreeSpaceHandling.NumberOfPagesInSection * 2 + 15);

tx.Commit();

Expand Down

0 comments on commit 2068cb3

Please sign in to comment.