diff --git a/osu.Game.Tests/Visual/Multiplayer/QueueModeTestScene.cs b/osu.Game.Tests/Visual/Multiplayer/QueueModeTestScene.cs index 0e01751d76..0e8093f459 100644 --- a/osu.Game.Tests/Visual/Multiplayer/QueueModeTestScene.cs +++ b/osu.Game.Tests/Visual/Multiplayer/QueueModeTestScene.cs @@ -61,6 +61,11 @@ namespace osu.Game.Tests.Visual.Multiplayer AddStep("import beatmap", () => { beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely(); + Realm.Write(r => + { + foreach (var beatmapInfo in r.All()) + beatmapInfo.OnlineMD5Hash = beatmapInfo.MD5Hash; + }); importedSet = beatmaps.GetAllUsableBeatmapSets().First(); InitialBeatmap = importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0); OtherBeatmap = importedSet.Beatmaps.Last(b => b.Ruleset.OnlineID == 0); diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs index ae939c7b9e..a62d9676c2 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayer.cs @@ -81,6 +81,11 @@ namespace osu.Game.Tests.Visual.Multiplayer AddStep("import beatmap", () => { beatmaps.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely(); + Realm.Write(r => + { + foreach (var beatmapInfo in r.All()) + beatmapInfo.OnlineMD5Hash = beatmapInfo.MD5Hash; + }); importedSet = beatmaps.GetAllUsableBeatmapSets().First(); }); diff --git a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomCreation.cs b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomCreation.cs index a748d61d44..2e90f08d47 100644 --- a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomCreation.cs +++ b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomCreation.cs @@ -176,6 +176,7 @@ namespace osu.Game.Tests.Visual.Playlists RulesetID = new OsuRuleset().RulesetInfo.OnlineID } ]; + room.EndDate = DateTimeOffset.Now.AddHours(1); }); AddAssert("match has default beatmap", () => match.Beatmap.IsDefault); @@ -212,6 +213,11 @@ namespace osu.Game.Tests.Visual.Playlists Debug.Assert(beatmap.BeatmapInfo.BeatmapSet != null); importedBeatmap = manager.Import(beatmap.BeatmapInfo.BeatmapSet)!.Value.Detach(); + Realm.Write(r => + { + foreach (var beatmapInfo in r.All()) + beatmapInfo.OnlineMD5Hash = beatmapInfo.MD5Hash; + }); }); private partial class TestPlaylistsRoomSubScreen : PlaylistsRoomSubScreen diff --git a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomSubScreen.cs b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomSubScreen.cs index e9c4b56e04..1841e2fd52 100644 --- a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomSubScreen.cs +++ b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistsRoomSubScreen.cs @@ -65,7 +65,8 @@ namespace osu.Game.Tests.Visual.Playlists OnlineID = 1, DifficultyName = "Osu 1", Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), - MD5Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), + MD5Hash = "11111111", + OnlineMD5Hash = "11111111", Ruleset = new OsuRuleset().RulesetInfo, Metadata = { @@ -79,7 +80,8 @@ namespace osu.Game.Tests.Visual.Playlists OnlineID = 2, DifficultyName = "Osu 2", Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), - MD5Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), + MD5Hash = "22222222", + OnlineMD5Hash = "22222222", Ruleset = new OsuRuleset().RulesetInfo, Metadata = { @@ -93,7 +95,8 @@ namespace osu.Game.Tests.Visual.Playlists OnlineID = 3, DifficultyName = "Taiko 1", Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), - MD5Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), + MD5Hash = "33333333", + OnlineMD5Hash = "33333333", Ruleset = new TaikoRuleset().RulesetInfo, Metadata = { @@ -107,7 +110,8 @@ namespace osu.Game.Tests.Visual.Playlists OnlineID = 4, DifficultyName = "Taiko 2", Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), - MD5Hash = Guid.NewGuid().ToString().ComputeMD5Hash(), + MD5Hash = "44444444", + OnlineMD5Hash = "44444444", Ruleset = new TaikoRuleset().RulesetInfo, Metadata = { diff --git a/osu.Game/Tests/Beatmaps/TestBeatmap.cs b/osu.Game/Tests/Beatmaps/TestBeatmap.cs index 1f0c08714e..caf99a4cf6 100644 --- a/osu.Game/Tests/Beatmaps/TestBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestBeatmap.cs @@ -68,6 +68,7 @@ namespace osu.Game.Tests.Beatmaps var b = Decoder.GetDecoder(reader).Decode(reader); b.BeatmapInfo.MD5Hash = test_beatmap_hash.Value.md5; + b.BeatmapInfo.OnlineMD5Hash = test_beatmap_hash.Value.md5; b.BeatmapInfo.Hash = test_beatmap_hash.Value.sha2; return b;