test(saf): failing two-node repro — leader-vs-oldest resync divergence wipes delivering node buffer (plan R2-02 T2)

This commit is contained in:
Joseph Doherty
2026-07-13 09:46:16 -04:00
parent 91209070d0
commit 6e0fa21307
2 changed files with 99 additions and 4 deletions
@@ -22,11 +22,12 @@ public sealed class TwoNodeClusterFixture : IAsyncDisposable
public int PortB { get; private set; }
public static async Task<TwoNodeClusterFixture> StartAsync(
string role = "Central", TimeSpan? stableAfter = null)
string role = "Central", TimeSpan? stableAfter = null,
int? portA = null, int? portB = null)
{
var f = new TwoNodeClusterFixture();
f.PortA = GetFreeTcpPort();
f.PortB = GetFreeTcpPort();
f.PortA = portA ?? GetFreeTcpPort();
f.PortB = portB ?? GetFreeTcpPort();
f.NodeA = f.StartNode(f.PortA, role, stableAfter);
await WaitForMembersUp(f.NodeA, 1, TimeSpan.FromSeconds(20));
f.NodeB = f.StartNode(f.PortB, role, stableAfter);
@@ -98,7 +99,7 @@ public sealed class TwoNodeClusterFixture : IAsyncDisposable
throw new TimeoutException($"Member {removed} was never removed from {cluster.SelfAddress}'s view — SBR did not down it.");
}
private static int GetFreeTcpPort()
public static int GetFreeTcpPort()
{
var listener = new System.Net.Sockets.TcpListener(System.Net.IPAddress.Loopback, 0);
listener.Start();