Merge pull request #15040 from peppy/realm-test-game-host

Update realm tests to run inside a `GameHost` to allow running on update thread
This commit is contained in:
Dan Balasescu
2021-10-12 21:16:06 +09:00
committed by GitHub
3 changed files with 73 additions and 30 deletions

View File

@ -135,9 +135,8 @@ namespace osu.Game.Database
if (IsDisposed)
throw new ObjectDisposedException(nameof(RealmContextFactory));
// TODO: this can be added for safety once we figure how to bypass in test
// if (!ThreadSafety.IsUpdateThread)
// throw new InvalidOperationException($"{nameof(BlockAllOperations)} must be called from the update thread.");
if (!ThreadSafety.IsUpdateThread)
throw new InvalidOperationException($"{nameof(BlockAllOperations)} must be called from the update thread.");
Logger.Log(@"Blocking realm operations.", LoggingTarget.Database);