1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 16:02:58 +08:00

Fix completely invalid method of testing realm migration

This commit is contained in:
Dean Herbert 2022-01-26 19:03:26 +09:00
parent 885fb92aad
commit abe2cccaae

View File

@ -47,16 +47,14 @@ namespace osu.Game.Tests.Database
liveBeatmap = beatmap.ToLive(realm);
});
using (realm.BlockAllOperations())
{
// recycle realm before migrating
}
using (var migratedStorage = new TemporaryNativeStorage("realm-test-migration-target"))
{
migratedStorage.DeleteDirectory(string.Empty);
storage.Migrate(migratedStorage);
using (realm.BlockAllOperations())
{
storage.Migrate(migratedStorage);
}
Assert.IsFalse(liveBeatmap?.PerformRead(l => l.Hidden));
}