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:
parent
f04d6d5e5e
commit
a0ead38496
@ -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;
|
||||
|
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user