feat: complete final jetstream parity transport and runtime baselines
This commit is contained in:
21
tests/NATS.Server.Tests/JetStreamStreamPolicyRuntimeTests.cs
Normal file
21
tests/NATS.Server.Tests/JetStreamStreamPolicyRuntimeTests.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user