Fixes tests

This commit is contained in:
Shannon
2019-01-07 16:15:51 +11:00
parent 986a7f368f
commit e20e570dc8

View File

@@ -239,9 +239,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
try
{
if (eMgr.TryGetIndex(Constants.UmbracoIndexes.InternalIndexName, out var index))
return index.GetSearcher();
throw new InvalidOperationException($"No index found by name {Constants.UmbracoIndexes.InternalIndexName}");
return eMgr.TryGetIndex(Constants.UmbracoIndexes.InternalIndexName, out var index) ? index.GetSearcher() : null;
}
catch (FileNotFoundException)
{