mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 04:23:00 +08:00
Fix test failure in TestSceneMultiplayerGameplayLeaderboard
The transfer of users was not accounting for the fact that the `StartPlay` calls are now scheduled and not necessarily run in time.
This commit is contained in:
parent
3e5de9e5a8
commit
121dd175e6
@ -73,8 +73,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
for (int i = 0; i < users; i++)
|
||||
spectatorClient.StartPlay(i, Beatmap.Value.BeatmapInfo.OnlineBeatmapID ?? 0);
|
||||
|
||||
Client.CurrentMatchPlayingUserIds.Clear();
|
||||
Client.CurrentMatchPlayingUserIds.AddRange(spectatorClient.PlayingUsers);
|
||||
spectatorClient.Schedule(() =>
|
||||
{
|
||||
Client.CurrentMatchPlayingUserIds.Clear();
|
||||
Client.CurrentMatchPlayingUserIds.AddRange(spectatorClient.PlayingUsers);
|
||||
});
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -91,6 +94,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
});
|
||||
|
||||
AddUntilStep("wait for load", () => leaderboard.IsLoaded);
|
||||
AddUntilStep("wait for user population", () => Client.CurrentMatchPlayingUserIds.Count > 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
@ -53,6 +54,8 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
});
|
||||
}
|
||||
|
||||
public new void Schedule(Action action) => base.Schedule(action);
|
||||
|
||||
/// <summary>
|
||||
/// Sends frames for an arbitrary user.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user