mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Wait for two update frames before attempting to migrate storage
This commit is contained in:
parent
dd7c3dbc5b
commit
835c8d74b7
@ -272,8 +272,16 @@ namespace osu.Game.Tests.NonVisual
|
|||||||
{
|
{
|
||||||
var osu = new OsuGameBase();
|
var osu = new OsuGameBase();
|
||||||
Task.Run(() => host.Run(osu));
|
Task.Run(() => host.Run(osu));
|
||||||
|
|
||||||
waitForOrAssert(() => osu.IsLoaded, @"osu! failed to start in a reasonable amount of time");
|
waitForOrAssert(() => osu.IsLoaded, @"osu! failed to start in a reasonable amount of time");
|
||||||
|
|
||||||
|
bool ready = false;
|
||||||
|
// wait for two update frames to be executed. this ensures that all components have had a change to run LoadComplete and hopefully avoid
|
||||||
|
// database access (GlobalActionContainer is one to do this).
|
||||||
|
host.UpdateThread.Scheduler.Add(() => host.UpdateThread.Scheduler.Add(() => ready = true));
|
||||||
|
|
||||||
|
waitForOrAssert(() => ready, @"osu! failed to start in a reasonable amount of time");
|
||||||
|
|
||||||
return osu;
|
return osu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user