Skip to content

Commit

Permalink
Fixed test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Jul 8, 2024
1 parent 9deaf12 commit 2f20c30
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,13 @@ public static async Task IncrementalCompaction(bool useCaching)
{
False(state.IsBackgroundCompaction);
await state.AppendAsync(new LogEntryList(entries));
await state.CommitAsync(4, CancellationToken.None);
await state.CommitAsync(5, CancellationToken.None);
await state.CommitAsync(CancellationToken.None);
Equal(entries.Length + 41L, state.Value);
checker = static (readResult, snapshotIndex, token) =>
{
Equal(3, readResult.Count);
Equal(4, snapshotIndex);
Equal(2, readResult.Count);
Equal(5, snapshotIndex);
True(readResult[0].IsSnapshot);
return default;
};
Expand All @@ -851,16 +851,16 @@ public static async Task IncrementalCompaction(bool useCaching)
{
checker = static (readResult, snapshotIndex, token) =>
{
Equal(3, readResult.Count);
Equal(2, readResult.Count);
NotNull(snapshotIndex);
return default;
};
await state.As<IRaftLog>().ReadAsync(new LogEntryConsumer(checker), 1, 6, CancellationToken.None);
Equal(0L, state.Value);
checker = static (readResult, snapshotIndex, token) =>
{
Equal(6, readResult.Count);
Equal(4, snapshotIndex);
Equal(5, readResult.Count);
Equal(5, snapshotIndex);
return default;
};
await state.As<IRaftLog>().ReadAsync(new LogEntryConsumer(checker), 1, CancellationToken.None);
Expand Down

0 comments on commit 2f20c30

Please sign in to comment.