test: lock SubList remote-key and match behavior
This commit is contained in:
@@ -47,6 +47,23 @@ public class RouteRemoteSubCleanupParityBatch2Tests
|
||||
sl.HasRemoteInterest("B", "orders.created").ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Applying_same_remote_subscription_twice_is_idempotent_for_interest_tracking()
|
||||
{
|
||||
using var sl = new SubList();
|
||||
var changes = new List<InterestChange>();
|
||||
sl.InterestChanged += changes.Add;
|
||||
|
||||
var sub = new RemoteSubscription("orders.*", "workers", "r1", "A");
|
||||
|
||||
sl.ApplyRemoteSub(sub);
|
||||
sl.ApplyRemoteSub(sub);
|
||||
|
||||
sl.HasRemoteInterest("A", "orders.created").ShouldBeTrue();
|
||||
sl.MatchRemote("A", "orders.created").Count.ShouldBe(1);
|
||||
changes.Count(change => change.Kind == InterestChangeKind.RemoteAdded).ShouldBe(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Route_disconnect_cleans_remote_interest_without_explicit_rs_minus()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user