feat: implement jetstream push delivery and heartbeat

This commit is contained in:
Joseph Doherty
2026-02-23 06:08:14 -05:00
parent 9a0de19c2d
commit fecb51095f
6 changed files with 113 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
namespace NATS.Server.Tests;
public class JetStreamPushConsumerTests
{
[Fact]
public async Task Push_consumer_delivers_and_sends_heartbeat()
{
await using var fixture = await JetStreamApiFixture.StartWithPushConsumerAsync();
await fixture.PublishAndGetAckAsync("orders.created", "1");
var frame = await fixture.ReadPushFrameAsync();
frame.IsData.ShouldBeTrue();
var hb = await fixture.ReadPushFrameAsync();
hb.IsHeartbeat.ShouldBeTrue();
}
}