1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Prevent test spectator clients from attempting hub connections

This commit is contained in:
Salman Ahmed 2021-02-09 08:02:51 +03:00
parent f04d6d5e5e
commit a0ead38496
2 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Online;
using osu.Game.Online.API;
using osu.Game.Online.Spectator;
using osu.Game.Replays.Legacy;
using osu.Game.Rulesets.Osu;
@ -243,6 +244,12 @@ namespace osu.Game.Tests.Visual.Gameplay
{
}
protected override HubClientConnector CreateConnector(string name, string endpoint, IAPIProvider api)
{
// do not pass API to prevent attempting failing connections on an actual hub.
return base.CreateConnector(name, endpoint, null);
}
public void StartPlay(int beatmapId)
{
this.beatmapId = beatmapId;

View File

@ -13,6 +13,7 @@ using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Database;
using osu.Game.Online;
using osu.Game.Online.API;
using osu.Game.Online.Spectator;
using osu.Game.Replays.Legacy;
using osu.Game.Rulesets.Osu.Scoring;
@ -105,6 +106,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
this.totalUsers = totalUsers;
}
protected override HubClientConnector CreateConnector(string name, string endpoint, IAPIProvider api)
{
// do not pass API to prevent attempting failing connections on an actual hub.
return base.CreateConnector(name, endpoint, null);
}
public void Start(int beatmapId)
{
for (int i = 0; i < totalUsers; i++)