mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Remove SingletonContextFactory
It is dangerous to use this as it doesn't correctly handle contexts and can cause issues that will never actually arise in normal execution.
This commit is contained in:
@ -62,7 +62,12 @@ namespace osu.Game.Tests.Visual
|
||||
var storage = new TestStorage(@"TestCasePlaySongSelect");
|
||||
|
||||
// this is by no means clean. should be replacing inside of OsuGameBase somehow.
|
||||
IDatabaseContextFactory factory = new SingletonContextFactory(new OsuDbContext());
|
||||
DatabaseContextFactory factory = new DatabaseContextFactory(storage);
|
||||
|
||||
factory.ResetDatabase();
|
||||
|
||||
using (var usage = factory.Get())
|
||||
usage.Migrate();
|
||||
|
||||
Dependencies.Cache(rulesets = new RulesetStore(factory));
|
||||
Dependencies.Cache(manager = new BeatmapManager(storage, factory, rulesets, null, null)
|
||||
|
Reference in New Issue
Block a user