1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:42:54 +08:00

Re-enable ignored tests that will work again now

This commit is contained in:
Dean Herbert 2022-06-15 00:48:00 +09:00
parent 88d5e074a8
commit cac724f436

View File

@ -393,7 +393,6 @@ namespace osu.Game.Tests.Database
}
[Test]
[Ignore("intentionally broken by import optimisations")]
public void TestImportThenImportWithChangedFile()
{
RunTestWithRealmAsync(async (realm, storage) =>
@ -490,7 +489,6 @@ namespace osu.Game.Tests.Database
}
[Test]
[Ignore("intentionally broken by import optimisations")]
public void TestImportCorruptThenImport()
{
RunTestWithRealmAsync(async (realm, storage) =>
@ -502,16 +500,18 @@ namespace osu.Game.Tests.Database
var firstFile = imported.Files.First();
var fileStorage = storage.GetStorageForDirectory("files");
long originalLength;
using (var stream = storage.GetStream(firstFile.File.GetStoragePath()))
using (var stream = fileStorage.GetStream(firstFile.File.GetStoragePath()))
originalLength = stream.Length;
using (var stream = storage.CreateFileSafely(firstFile.File.GetStoragePath()))
using (var stream = fileStorage.CreateFileSafely(firstFile.File.GetStoragePath()))
stream.WriteByte(0);
var importedSecondTime = await LoadOszIntoStore(importer, realm.Realm);
using (var stream = storage.GetStream(firstFile.File.GetStoragePath()))
using (var stream = fileStorage.GetStream(firstFile.File.GetStoragePath()))
Assert.AreEqual(stream.Length, originalLength, "Corruption was not fixed on second import");
// check the newly "imported" beatmap is actually just the restored previous import. since it matches hash.