Skip to content

Commit f5cab32

Browse files
committed
Skipping Issue2127 Test before build process
Fixing some ensure messages
1 parent 431be5f commit f5cab32

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

LiteDB.Tests/Issues/Issue2127_Tests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Issue2127_Tests
1010
{
1111
public class ReproTests
1212
{
13-
[Fact]
13+
[Fact(Skip = "To slow for a unit test in a build process")]
1414
public void InsertItemBackToBack_Test()
1515
{
1616
var databaseDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DatabaseLocation");

LiteDB/Engine/Pages/BasePage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ private BufferSlice InternalInsert(ushort bytesLength, ref byte index)
320320
// calculate how many continuous bytes are avaiable in this page
321321
var continuousBlocks = this.FreeBytes - this.FragmentedBytes - (isNewInsert ? SLOT_SIZE : 0);
322322

323-
ENSURE(continuousBlocks == PAGE_SIZE - this.NextFreePosition - this.FooterSize - (isNewInsert ? SLOT_SIZE : 0), "continuosBlock must be same as from NextFreePosition");
323+
ENSURE(continuousBlocks == PAGE_SIZE - this.NextFreePosition - this.FooterSize - (isNewInsert ? SLOT_SIZE : 0), "continuousBlock must be same as from NextFreePosition");
324324

325-
// if continuous blocks are not big enough for this data, must run page defrag
325+
// if continuous blocks are not enough for this data, must run page defrag
326326
if (bytesLength > continuousBlocks)
327327
{
328328
this.Defrag();
@@ -617,7 +617,7 @@ private byte GetFreeIndex()
617617
var positionAddr = CalcPositionAddr(index);
618618
var position = _buffer.ReadUInt16(positionAddr);
619619

620-
// if position = 0 means this slot are not used
620+
// if position = 0 means this slot is not used
621621
if (position == 0)
622622
{
623623
_startIndex = (byte)(index + 1);
@@ -637,7 +637,7 @@ public IEnumerable<byte> GetUsedIndexs()
637637
// check for empty before loop
638638
if (this.ItemsCount == 0) yield break;
639639

640-
ENSURE(this.HighestIndex != byte.MaxValue, "if has items count Heighest index should be not emtpy");
640+
ENSURE(this.HighestIndex != byte.MaxValue, "if has items count, Highest index should be not empty");
641641

642642
// [safe for byte loop] - because this.HighestIndex can't be 255
643643
for (byte index = 0; index <= this.HighestIndex; index++)

0 commit comments

Comments
 (0)