feat: execute full-repo remaining parity closure plan

This commit is contained in:
Joseph Doherty
2026-02-23 13:08:52 -05:00
parent cbe1fa6121
commit 2b64d762f6
75 changed files with 2325 additions and 121 deletions

View File

@@ -0,0 +1,24 @@
using NATS.Server.Subscriptions;
namespace NATS.Server.Tests;
public class SubListNotificationTests
{
[Fact]
public void Interest_change_notifications_are_emitted_for_local_and_remote_changes()
{
using var sl = new SubList();
var changes = new List<InterestChange>();
sl.InterestChanged += changes.Add;
var sub = new Subscription { Subject = "orders.created", Sid = "1" };
sl.Insert(sub);
sl.Remove(sub);
sl.ApplyRemoteSub(new RemoteSubscription("orders.*", null, "r1", "A"));
sl.ApplyRemoteSub(RemoteSubscription.Removal("orders.*", null, "r1", "A"));
changes.Count.ShouldBe(4);
changes.Select(c => c.Kind).ShouldContain(InterestChangeKind.LocalAdded);
changes.Select(c => c.Kind).ShouldContain(InterestChangeKind.RemoteAdded);
}
}