fix: scope realtime fanout dedup per node
This commit is contained in:
@@ -191,6 +191,20 @@ func TestLoginTokenRevocation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRealtimeFanoutDedupClaimIDIsNodeScoped(t *testing.T) {
|
||||
tenantID := types.TenantID(7)
|
||||
dedupKey := "data:p2pABC:42"
|
||||
|
||||
nodeA := realtimeFanoutDedupClaimID(tenantID, "pod-a", dedupKey)
|
||||
nodeB := realtimeFanoutDedupClaimID(tenantID, "pod-b", dedupKey)
|
||||
if nodeA == nodeB {
|
||||
t.Fatalf("dedup claim id must be node-scoped: %q", nodeA)
|
||||
}
|
||||
if got, want := realtimeFanoutDedupClaimID(tenantID, "", dedupKey), "7:local:data:p2pABC:42"; got != want {
|
||||
t.Fatalf("unexpected local fallback claim id: got %q want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMessageRuntimeSeqAndClientMidIdempotency(t *testing.T) {
|
||||
oldRuntime := groupMsgRuntime
|
||||
runtime := newTestGroupMessageRuntime()
|
||||
|
||||
Reference in New Issue
Block a user