platform/service: fix a flaky test (#21497)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-10-26 06:12:10 +03:00
коммит произвёл GitHub
родитель 271b3bf915
Коммит 0fc1655cfc

Просмотреть файл

@@ -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)
}