MM-37491: Fix flaky test on file content extraction (#18077)

* MM-37491: Fix flaky test on file content extraction

* Changing Error log to Warn log

* Fix uppercase and dot in the log file

* Simplifiying the test case

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2021-08-09 12:32:29 +02:00
коммит произвёл GitHub
родитель 8bfe24c774
Коммит a88702fdaf
2 изменённых файлов: 11 добавлений и 1 удалений

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

@@ -1356,6 +1356,12 @@ func (a *App) ExtractContentFromFileInfo(fileInfo *model.FileInfo) error {
if storeErr := a.Srv().Store.FileInfo().SetContent(fileInfo.Id, text); storeErr != nil {
return errors.Wrap(storeErr, "failed to save the extracted file content")
}
reloadFileInfo, storeErr := a.Srv().Store.FileInfo().Get(fileInfo.Id)
if storeErr != nil {
mlog.Warn("Failed to invalidate the fileInfo cache.", mlog.Err(storeErr), mlog.String("file_info_id", fileInfo.Id))
} else {
a.Srv().Store.FileInfo().InvalidateFileInfosForPostCache(reloadFileInfo.PostId, false)
}
}
return nil
}