feat: complete final jetstream parity transport and runtime baselines

This commit is contained in:
Joseph Doherty
2026-02-23 11:04:43 -05:00
parent 53585012f3
commit 8bce096f55
61 changed files with 2655 additions and 129 deletions

View File

@@ -0,0 +1,21 @@
using NATS.Server.JetStream.Models;
namespace NATS.Server.Tests;
public class JetStreamStreamPolicyRuntimeTests
{
[Fact]
public async Task Discard_new_rejects_publish_when_max_bytes_exceeded()
{
await using var fx = await JetStreamApiFixture.StartWithStreamConfigAsync(new StreamConfig
{
Name = "S",
Subjects = ["s.*"],
MaxBytes = 2,
Discard = DiscardPolicy.New,
});
(await fx.PublishAndGetAckAsync("s.a", "12")).ErrorCode.ShouldBeNull();
(await fx.PublishAndGetAckAsync("s.a", "34")).ErrorCode.ShouldNotBeNull();
}
}