feat: execute post-baseline jetstream parity plan

This commit is contained in:
Joseph Doherty
2026-02-23 12:11:19 -05:00
parent c3763e83d6
commit b41e6ff320
58 changed files with 1430 additions and 102 deletions

View File

@@ -0,0 +1,25 @@
using NATS.Server.Raft;
namespace NATS.Server.Tests;
public class RaftSnapshotTransferParityTests
{
[Fact]
public async Task Snapshot_transfer_installs_snapshot_when_follower_falls_behind()
{
var transport = new InMemoryRaftTransport();
var leader = new RaftNode("L", transport);
var follower = new RaftNode("F", transport);
transport.Register(leader);
transport.Register(follower);
var snapshot = new RaftSnapshot
{
LastIncludedIndex = 10,
LastIncludedTerm = 3,
};
await transport.InstallSnapshotAsync("L", "F", snapshot, default);
follower.AppliedIndex.ShouldBe(10);
}
}