mirror of
https://github.com/ppy/osu.git
synced 2025-01-22 13:45:08 +08:00
Fix test not waiting properly for background processing to complete
This commit is contained in:
parent
6db135279f
commit
53b6f9e385
@ -179,7 +179,9 @@ namespace osu.Game.Tests.Database
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("Run background processor", () => Add(new TestBackgroundDataStoreProcessor()));
|
TestBackgroundDataStoreProcessor processor = null!;
|
||||||
|
AddStep("Run background processor", () => Add(processor = new TestBackgroundDataStoreProcessor()));
|
||||||
|
AddUntilStep("Wait for completion", () => processor.Completed);
|
||||||
|
|
||||||
AddUntilStep("Score marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.True);
|
AddUntilStep("Score marked as failed", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.BackgroundReprocessingFailed), () => Is.True);
|
||||||
AddAssert("Score version not upgraded", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.TotalScoreVersion), () => Is.EqualTo(scoreVersion));
|
AddAssert("Score version not upgraded", () => Realm.Run(r => r.Find<ScoreInfo>(scoreInfo.ID)!.TotalScoreVersion), () => Is.EqualTo(scoreVersion));
|
||||||
|
Loading…
Reference in New Issue
Block a user