Fix race condition in telemetry (#18734)

* Fix race condition in telemetry

* Fix tests
Этот коммит содержится в:
Daniel Espino García
2021-10-20 09:58:25 +02:00
коммит произвёл GitHub
родитель c75058d4bc
Коммит 5928e4f9e0
5 изменённых файлов: 87 добавлений и 17 удалений

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

@@ -50,7 +50,6 @@ func TestUnitUpdateConfig(t *testing.T) {
mockSystemStore.On("GetByName", "UpgradedFromTE").Return(&model.System{Name: "UpgradedFromTE", Value: "false"}, nil)
mockSystemStore.On("GetByName", "InstallationDate").Return(&model.System{Name: "InstallationDate", Value: "10"}, nil)
mockSystemStore.On("GetByName", "FirstServerRunTimestamp").Return(&model.System{Name: "FirstServerRunTimestamp", Value: "10"}, nil)
mockSystemStore.On("Get").Return(make(model.StringMap), nil)
mockLicenseStore := mocks.LicenseStore{}
mockLicenseStore.On("Get", "").Return(&model.LicenseRecord{}, nil)
mockStore.On("User").Return(&mockUserStore)