Skip to content

Commit

Permalink
feat: 后台增加限流配置页面 #2655
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 committed Oct 24, 2024
1 parent c10696c commit 3bff4fd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import com.tencent.bkrepo.common.ratelimiter.enums.LimitDimension
import com.tencent.bkrepo.common.ratelimiter.enums.WorkScope
import com.tencent.bkrepo.common.ratelimiter.exception.InvalidResourceException
import com.tencent.bkrepo.common.ratelimiter.metrics.RateLimiterMetrics
import com.tencent.bkrepo.common.ratelimiter.repository.RateLimitRepository
import com.tencent.bkrepo.common.ratelimiter.rule.common.ResInfo
import com.tencent.bkrepo.common.ratelimiter.rule.common.ResourceLimit
import com.tencent.bkrepo.common.ratelimiter.service.user.RateLimiterConfigService
Expand All @@ -68,13 +69,17 @@ open class AbstractRateLimiterServiceTest : DistributedTest() {
@MockBean
private lateinit var meterRegistry: MeterRegistry

@MockBean
private lateinit var rateLimitRepository: RateLimitRepository

fun init() {
request = MockHttpServletRequest()
val scheduler = ThreadPoolTaskScheduler()
scheduler.initialize()
taskScheduler = scheduler
rateLimiterProperties = RateLimiterProperties()
rateLimiterMetrics = RateLimiterMetrics(meterRegistry)
rateLimiterConfigService = RateLimiterConfigService(rateLimitRepository)
}


Expand Down

0 comments on commit 3bff4fd

Please sign in to comment.