Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/BLite.Tests/IndexPageReleaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public async Task Dispose_WaitsForThePendingFreeCheckpoint_LongerThanTheLockTime
[Fact]
public async Task DynamicCollection_DropIndex_WaitsForTheCollectionLock()
{
using var engine = new BLiteEngine(_dbPath);
using var engine = new BLiteEngine(_dbPath, LoadTolerant);
var col = engine.GetOrCreateCollection("docs");
await InsertIndexableDocsAsync(col, 100);
await col.CreateIndexAsync("value", "idx_value");
Expand Down Expand Up @@ -406,7 +406,7 @@ public async Task DynamicCollection_DropIndex_WaitsForTheCollectionLock()
[Fact]
public async Task DynamicCollection_DropIndex_WhileInserting_KeepsCollectionAndOtherIndexConsistent()
{
using var engine = new BLiteEngine(_dbPath);
using var engine = new BLiteEngine(_dbPath, LoadTolerant);
var col = engine.GetOrCreateCollection("docs");
await InsertIndexableDocsAsync(col, 500);
await col.CreateIndexAsync("value", "idx_value");
Expand Down Expand Up @@ -439,6 +439,11 @@ await col.InsertAsync(col.CreateDocument(["value", "payload"],
// Helpers
// ======================================================================

// The concurrency tests check ordering and consistency, not lock latency: on a loaded CI
// runner the 500 ms default lets a writer time out behind its peers, which says nothing
// about the behaviour under test.
private static readonly PageFileConfig LoadTolerant = PageFileConfig.Default with { LockTimeout = LockTimeout.From(30_000, 30_000) };

private static readonly System.Reflection.BindingFlags Flags =
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance;

Expand Down
Loading