feat(batch24): complete leaf nodes implementation and verification

This commit is contained in:
Joseph Doherty
2026-03-01 01:31:57 -05:00
parent ff7e674ec4
commit 3e9ad16033
36 changed files with 3427 additions and 21 deletions

View File

@@ -171,4 +171,22 @@ public sealed partial class LeafNodeHandlerTests
((INatsAccount)account).RemoveClient(leaf);
account.NumLocalLeafNodes().ShouldBe(0);
}
[Fact] // T:1966
public void LeafNodeRoutedSubKeyDifferentBetweenLeafSubAndRoutedSub_ShouldSucceed()
{
var plain = new Subscription { Subject = "foo"u8.ToArray() };
var queue = new Subscription { Subject = "XYZ"u8.ToArray(), Queue = "foo"u8.ToArray() };
var routedPlain = LeafNodeHandler.KeyFromSubWithOrigin(plain);
var routedQueue = LeafNodeHandler.KeyFromSubWithOrigin(queue);
var leafPlain = LeafNodeHandler.KeyFromSubWithOrigin(plain, "XYZ");
var leafQueue = LeafNodeHandler.KeyFromSubWithOrigin(queue, "XYZ");
routedPlain.ShouldNotBe(routedQueue);
routedQueue.ShouldNotBe(leafPlain);
leafPlain.ShouldNotBe(leafQueue);
routedPlain.ShouldNotBe(leafPlain);
routedQueue.ShouldNotBe(leafQueue);
}
}