Skip to content

Commit 649332d

Browse files
Skip online metadata fetch in BackgroundDataStoreProcessor during tests
This prevents flaky network requests and timeouts in unit tests that involve the BackgroundDataStoreProcessor (e.g. BackgroundDataStoreProcessorTests). The `backpopulateUserTags` and `backpopulateMissingSubmissionAndRankDates` tasks were attempting to download the full `online.db` database or perform lookups that rely on it, causing significant delays and potential failures in CI environments. Skipping these operations when `DebugUtils.IsNUnitRunning` is true ensures tests run reliably and quickly without external dependencies. Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent e0602db commit 649332d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

osu.Game/Database/BackgroundDataStoreProcessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ private void upgradeScoreRanks()
537537

538538
private void backpopulateMissingSubmissionAndRankDates()
539539
{
540+
if (DebugUtils.IsNUnitRunning) return;
541+
540542
if (!localMetadataSource.Available)
541543
{
542544
Logger.Log("Cannot backpopulate missing submission/rank dates because the local metadata cache is missing.");

0 commit comments

Comments
 (0)