mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 01:32:55 +08:00
Re-enable ignored tests that will work again now
This commit is contained in:
parent
88d5e074a8
commit
cac724f436
@ -393,7 +393,6 @@ namespace osu.Game.Tests.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore("intentionally broken by import optimisations")]
|
|
||||||
public void TestImportThenImportWithChangedFile()
|
public void TestImportThenImportWithChangedFile()
|
||||||
{
|
{
|
||||||
RunTestWithRealmAsync(async (realm, storage) =>
|
RunTestWithRealmAsync(async (realm, storage) =>
|
||||||
@ -490,7 +489,6 @@ namespace osu.Game.Tests.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore("intentionally broken by import optimisations")]
|
|
||||||
public void TestImportCorruptThenImport()
|
public void TestImportCorruptThenImport()
|
||||||
{
|
{
|
||||||
RunTestWithRealmAsync(async (realm, storage) =>
|
RunTestWithRealmAsync(async (realm, storage) =>
|
||||||
@ -502,16 +500,18 @@ namespace osu.Game.Tests.Database
|
|||||||
|
|
||||||
var firstFile = imported.Files.First();
|
var firstFile = imported.Files.First();
|
||||||
|
|
||||||
|
var fileStorage = storage.GetStorageForDirectory("files");
|
||||||
|
|
||||||
long originalLength;
|
long originalLength;
|
||||||
using (var stream = storage.GetStream(firstFile.File.GetStoragePath()))
|
using (var stream = fileStorage.GetStream(firstFile.File.GetStoragePath()))
|
||||||
originalLength = stream.Length;
|
originalLength = stream.Length;
|
||||||
|
|
||||||
using (var stream = storage.CreateFileSafely(firstFile.File.GetStoragePath()))
|
using (var stream = fileStorage.CreateFileSafely(firstFile.File.GetStoragePath()))
|
||||||
stream.WriteByte(0);
|
stream.WriteByte(0);
|
||||||
|
|
||||||
var importedSecondTime = await LoadOszIntoStore(importer, realm.Realm);
|
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");
|
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.
|
// check the newly "imported" beatmap is actually just the restored previous import. since it matches hash.
|
||||||
|
Loading…
Reference in New Issue
Block a user