fix: update existing limiter rates & adapt flush test for dedup

This commit is contained in:
xboard
2026-03-25 18:31:37 +08:00
parent b51cecfe17
commit 691ca93c82
2 changed files with 19 additions and 5 deletions
+3 -3
View File
@@ -164,10 +164,10 @@ func TestFlushAliveIPs(t *testing.T) {
t.Errorf("user 2 IPs: got %d, want 1", len(flushed[2]))
}
// Without another Process call, aliveIPs still reflect last known state
// Without another Process call, hash is same → returns nil (skip duplicate)
flushed2 := tr.FlushAliveIPs()
if len(flushed2[1]) != 2 {
t.Errorf("expected same IPs without new Process, got %v", flushed2)
if flushed2 != nil {
t.Errorf("expected nil on duplicate flush, got %v", flushed2)
}
}