diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs index 57dbb2d266..5d85bf0a5d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs @@ -12,7 +12,7 @@ namespace osu.Desktop.VisualTests.Tests { class TestCasePlaySongSelect : TestCase { - private BeatmapDatabase db; + private BeatmapDatabase db, oldDb; private TestStorage storage; public override string Name => @"Song Select"; @@ -21,7 +21,7 @@ namespace osu.Desktop.VisualTests.Tests public override void Reset() { base.Reset(); - + oldDb = Dependencies.Get(); if (db == null) { storage = new TestStorage(@"TestCasePlaySongSelect"); @@ -35,9 +35,14 @@ namespace osu.Desktop.VisualTests.Tests db.Import(sets); } - Add(new PlaySongSelect()); } + + protected override void Dispose(bool isDisposing) + { + Dependencies.Cache(oldDb, true); + base.Dispose(isDisposing); + } private BeatmapSetInfo createTestBeatmapSet(int i) {