mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Wait for async continuation in score submission test
The previous assert step was optimistically assuming that the async continuation that writes the value of `FakeImportingPlayer.ImportedScore` always completes before it, but that's not necessarily true even if the continuation is instant (it is still subject to things like task scheduling and TPL thread pool limits). To ensure no spurious failures, swap out the assert step for an until step instead.
This commit is contained in:
parent
84765b99b3
commit
66613cbaa4
@ -226,7 +226,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
AddStep("exit", () => Player.Exit());
|
||||
AddStep("allow import to proceed", () => Player.AllowImportCompletion.Release(1));
|
||||
AddAssert("ensure submission", () => Player.SubmittedScore != null && Player.ImportedScore != null);
|
||||
AddUntilStep("ensure submission", () => Player.SubmittedScore != null && Player.ImportedScore != null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user