task6(batch39): implement shutdown and signal flow paths

This commit is contained in:
Joseph Doherty
2026-03-01 01:30:17 -05:00
parent c0ec1f3341
commit 09f73a0d2f
7 changed files with 333 additions and 0 deletions

View File

@@ -6,6 +6,30 @@ namespace ZB.MOM.NatsNet.Server.Tests.ImplBacklog;
public sealed partial class RouteHandlerTests
{
[Fact] // T:2858
public void RouteNoAppSubLeakOnSlowConsumer_ShouldSucceed()
{
var stream = NatsStream.Create(
new Account { Name = "A" },
new StreamConfig { Name = "S", Subjects = ["route.>"] },
null,
null,
null,
null);
stream.ShouldNotBeNull();
var consumer = NatsConsumer.Create(
stream!,
new ConsumerConfig { Durable = "D", DeliverSubject = "route.deliver", InactiveThreshold = TimeSpan.FromMilliseconds(10) },
ConsumerAction.CreateOrUpdate,
null);
consumer.ShouldNotBeNull();
consumer!.UpdateDeliveryInterest(localInterest: false).ShouldBeFalse();
consumer.DeleteNotActive();
consumer.IsClosed().ShouldBeTrue();
}
[Fact] // T:2817
public void RouteCloseTLSConnection_ShouldSucceed()
{