Fix test failures due to online cache download

This commit is contained in:
Dean Herbert 2020-05-03 13:25:57 +09:00
parent 6fef4eeb8f
commit 68d40cf790

View File

@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Dapper; using Dapper;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
using osu.Framework.Development;
using osu.Framework.IO.Network; using osu.Framework.IO.Network;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Framework.Platform; using osu.Framework.Platform;
@ -40,7 +41,8 @@ namespace osu.Game.Beatmaps
this.api = api; this.api = api;
this.storage = storage; this.storage = storage;
if (!storage.Exists(cache_database_name)) // avoid downloading / using cache for unit tests.
if (!DebugUtils.IsNUnitRunning && !storage.Exists(cache_database_name))
prepareLocalCache(); prepareLocalCache();
} }