feat: add jetstream mirror and source orchestration

This commit is contained in:
Joseph Doherty
2026-02-23 06:10:41 -05:00
parent d3aad48096
commit f1d3c19594
6 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
namespace NATS.Server.Tests;
public class JetStreamMirrorSourceTests
{
[Fact]
public async Task Mirror_stream_replays_origin_messages()
{
await using var fixture = await JetStreamApiFixture.StartWithMirrorSetupAsync();
await fixture.PublishAndGetAckAsync("ORDERS", "orders.created", "1");
await fixture.WaitForMirrorSyncAsync("ORDERS_MIRROR");
var state = await fixture.GetStreamStateAsync("ORDERS_MIRROR");
state.Messages.ShouldBe((ulong)1);
}
}