From 0fc1655cfca8a31b97f682baed635eb92e116961 Mon Sep 17 00:00:00 2001 From: Ibrahim Serdar Acikgoz Date: Wed, 26 Oct 2022 06:12:10 +0300 Subject: [PATCH] platform/service: fix a flaky test (#21497) --- app/platform/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/platform/service.go b/app/platform/service.go index 6620b7f487..018dc9569a 100644 --- a/app/platform/service.go +++ b/app/platform/service.go @@ -173,7 +173,7 @@ func New(sc ServiceConfig, options ...Option) (*PlatformService, error) { ps.initEnterprise() // Step 5: Init Metrics - if metricsInterfaceFn != nil { + if metricsInterfaceFn != nil && ps.metricsIFace == nil { // if the metrics interface is set by options, do not override it ps.metricsIFace = metricsInterfaceFn(ps, *ps.configStore.Get().SqlSettings.DriverName, *ps.configStore.Get().SqlSettings.DataSource) }