diff --git a/Server/ws/emit_test.go b/Server/ws/emit_test.go index b255dfcf..07ebacf4 100644 --- a/Server/ws/emit_test.go +++ b/Server/ws/emit_test.go @@ -34,6 +34,7 @@ func newEmitTestHub() *Hub { pubsub: NewPubSub(), replayBuf: NewEventRingBuffer(100), voiceKeyHolders: make(map[int64]int64), + topicLimiter: NewTopicRateLimiter(topicRateLimitPerSecond, time.Second), } } diff --git a/Server/ws/export_test.go b/Server/ws/export_test.go index e34f3dab..a8a10e9c 100644 --- a/Server/ws/export_test.go +++ b/Server/ws/export_test.go @@ -93,8 +93,9 @@ func (p *LiveKitProcess) SetProcessStoppedForTest() { // NewHubForTest creates a minimal Hub with no DB or limiter for webhook testing. func NewHubForTest() *Hub { return &Hub{ - clients: make(map[int64]*Client), - pubsub: NewPubSub(), + clients: make(map[int64]*Client), + pubsub: NewPubSub(), + topicLimiter: NewTopicRateLimiter(topicRateLimitPerSecond, time.Second), } }