Files
natsdotnet/tests/NATS.Server.LeafNodes.Tests/LeafNodes/LeafLoopTransparencyRuntimeTests.cs
Joseph Doherty 3f7d896a34 refactor: extract NATS.Server.LeafNodes.Tests project
Move 28 leaf node test files from NATS.Server.Tests into a dedicated
NATS.Server.LeafNodes.Tests project. Update namespaces, add
InternalsVisibleTo, register in solution file. Replace all Task.Delay
polling loops with PollHelper.WaitUntilAsync/YieldForAsync from
TestUtilities. Replace private ReadUntilAsync in LeafProtocolTests
with SocketTestHelper.ReadUntilAsync.

All 281 tests pass.
2026-03-12 15:23:33 -04:00

19 lines
542 B
C#

using NATS.Server.LeafNodes;
namespace NATS.Server.LeafNodes.Tests.LeafNodes;
public class LeafLoopTransparencyRuntimeTests
{
[Fact]
public void Transport_internal_reply_and_loop_markers_never_leak_to_client_visible_subjects()
{
var nested = LeafLoopDetector.Mark(
LeafLoopDetector.Mark("orders.created", "S1"),
"S2");
LeafLoopDetector.TryUnmark(nested, out var unmarked).ShouldBeTrue();
unmarked.ShouldBe("orders.created");
unmarked.ShouldNotStartWith("$LDS.");
}
}