feat: add resilient reconnect and catch-up replay

This commit is contained in:
Joseph Doherty
2026-03-17 11:04:19 -04:00
parent c278f98496
commit 2f04ec9d1d
29 changed files with 3746 additions and 95 deletions

View File

@@ -6,7 +6,7 @@ namespace SuiteLink.Client.Tests;
public sealed class SuiteLinkClientConnectionTests
{
[Fact]
public async Task ConnectAsync_SendsHandshakeThenConnect_ButDoesNotReportReadyYet()
public async Task ConnectAsync_SendsHandshakeThenConnect_AndTransitionsToReadyWhenRuntimeLoopStarts()
{
var handshakeAckFrame = new byte[] { 0x06, 0x00, 0x01, 0x00, 0xA1, 0xB2, 0xC3, 0xA5 };
var transport = new FakeTransport([handshakeAckFrame[..4], handshakeAckFrame[4..]]);
@@ -15,7 +15,7 @@ public sealed class SuiteLinkClientConnectionTests
await client.ConnectAsync(options);
Assert.False(client.IsConnected);
Assert.True(client.IsConnected);
Assert.Equal(2, transport.SentBuffers.Count);
Assert.Equal(
SuiteLinkHandshakeCodec.EncodeNormalQueryHandshake(