mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix regression in tournament test startup behaviour
This commit is contained in:
parent
7d057ab6ce
commit
13aaf766f9
@ -13,17 +13,18 @@ namespace osu.Game.Tournament.Tests
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
BracketLoadTask.Wait();
|
||||
|
||||
LoadComponentAsync(new Background("Menu/menu-background-0")
|
||||
BracketLoadTask.ContinueWith(_ => Schedule(() =>
|
||||
{
|
||||
Colour = OsuColour.Gray(0.5f),
|
||||
Depth = 10
|
||||
}, AddInternal);
|
||||
LoadComponentAsync(new Background("Menu/menu-background-0")
|
||||
{
|
||||
Colour = OsuColour.Gray(0.5f),
|
||||
Depth = 10
|
||||
}, AddInternal);
|
||||
|
||||
// Have to construct this here, rather than in the constructor, because
|
||||
// we depend on some dependencies to be loaded within OsuGameBase.load().
|
||||
Add(new TestBrowser());
|
||||
// Have to construct this here, rather than in the constructor, because
|
||||
// we depend on some dependencies to be loaded within OsuGameBase.load().
|
||||
Add(new TestBrowser());
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,12 +154,13 @@ namespace osu.Game.Tournament.Tests
|
||||
|
||||
protected override void LoadAsyncComplete()
|
||||
{
|
||||
BracketLoadTask.Wait();
|
||||
|
||||
// this has to be run here rather than LoadComplete because
|
||||
// TestScene.cs is checking the IsLoaded state (on another thread) and expects
|
||||
// the runner to be loaded at that point.
|
||||
Add(runner = new TestSceneTestRunner.TestRunner());
|
||||
BracketLoadTask.ContinueWith(_ => Schedule(() =>
|
||||
{
|
||||
// this has to be run here rather than LoadComplete because
|
||||
// TestScene.cs is checking the IsLoaded state (on another thread) and expects
|
||||
// the runner to be loaded at that point.
|
||||
Add(runner = new TestSceneTestRunner.TestRunner());
|
||||
}));
|
||||
}
|
||||
|
||||
public void RunTestBlocking(TestScene test) => runner.RunTestBlocking(test);
|
||||
|
Loading…
Reference in New Issue
Block a user