Skip to content

Commit

Permalink
add N limit count
Browse files Browse the repository at this point in the history
  • Loading branch information
mbdavid committed Feb 19, 2024
1 parent 7440fd8 commit 5eca42e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

10 changes: 6 additions & 4 deletions LiteDB.Tests/Engine/Rebuild_Crash_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class Rebuild_Crash_Tests
[Fact]
public void Rebuild_Crash_IO_Write_Error()
{
var N = 1_000;

using (var file = new TempFile())
{
var settings = new EngineSettings
Expand All @@ -24,7 +26,7 @@ public void Rebuild_Crash_IO_Write_Error()
Password = "46jLz5QWd5fI3m4LiL2r"
};

var data = Enumerable.Range(1, 10_000).Select(i => new BsonDocument
var data = Enumerable.Range(1, N).Select(i => new BsonDocument
{
["_id"] = i,
["name"] = Faker.Fullname(),
Expand All @@ -41,7 +43,7 @@ public void Rebuild_Crash_IO_Write_Error()
{
var p = new BasePage(page);
if (p.PageID == 248)
if (p.PageID == 28)
{
p.ColID.Should().Be(1);
p.PageType.Should().Be(PageType.Data);
Expand Down Expand Up @@ -79,8 +81,8 @@ public void Rebuild_Crash_IO_Write_Error()
var col2 = db.Query("col2", Query.All()).ToList().Count;
var errors = db.Query("_rebuild_errors", Query.All()).ToList().Count;

col1.Should().Be(9_999);
col2.Should().Be(10_000);
col1.Should().Be(N - 1);
col2.Should().Be(N);
errors.Should().Be(1);

}
Expand Down
6 changes: 6 additions & 0 deletions LiteDB.Tests/LiteDB.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<NoWarn>1701;1702;1705;1591;0618</NoWarn>
</PropertyGroup>

<ItemGroup>
<None Update="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<Compile Remove="Internals\**" />
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions LiteDB.Tests/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parallelizeAssembly": false,
"parallelizeTestCollections": false
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LiteDB - A .NET NoSQL Document Store in a single data file

[![Join the chat at https://gitter.im/mbdavid/LiteDB](https://badges.gitter.im/mbdavid/LiteDB.svg)](https://gitter.im/mbdavid/LiteDB?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build status](https://ci.appveyor.com/api/projects/status/sfe8he0vik18m033?svg=true)](https://ci.appveyor.com/project/mbdavid/litedb) [![Build Status](https://travis-ci.org/mbdavid/LiteDB.svg?branch=master)](https://travis-ci.org/mbdavid/LiteDB)
[![Build status](https://ci.appveyor.com/api/projects/status/sfe8he0vik18m033?svg=true)](https://ci.appveyor.com/project/mbdavid/litedb)

---

Expand Down

0 comments on commit 5eca42e

Please sign in to comment.