mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fix a few more multiplayer test timeouts
These can be tested by adding a `Task.Delay(3000);` at the end of the `MultiplayerClient.JoinRoom` task. The reason is typically that `Client.Room` becomes not-null but the join task still hasn't completed yet, so e.g. the ready button is still disabled.
This commit is contained in:
@ -214,7 +214,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("Press select", () => InputManager.Key(Key.Enter));
|
||||
|
||||
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||
AddUntilStep("wait for join", () => client.Room != null);
|
||||
AddUntilStep("wait for join", () => roomManager.RoomJoined);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -293,7 +293,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("join room", () => InputManager.Key(Key.Enter));
|
||||
|
||||
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||
AddUntilStep("wait for join", () => client.Room != null);
|
||||
AddUntilStep("wait for join", () => roomManager.RoomJoined);
|
||||
|
||||
AddAssert("Check participant count correct", () => client.APIRoom?.ParticipantCount.Value == 1);
|
||||
AddAssert("Check participant list contains user", () => client.APIRoom?.RecentParticipants.Count(u => u.Id == API.LocalUser.Value.Id) == 1);
|
||||
@ -351,7 +351,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddStep("press join room button", () => passwordEntryPopover.ChildrenOfType<OsuButton>().First().TriggerClick());
|
||||
|
||||
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||
AddUntilStep("wait for join", () => client.Room != null);
|
||||
AddUntilStep("wait for join", () => roomManager.RoomJoined);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -618,7 +618,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
AddStep("join room", () => InputManager.Key(Key.Enter));
|
||||
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||
AddUntilStep("wait for join", () => client.Room != null);
|
||||
AddUntilStep("wait for join", () => roomManager.RoomJoined);
|
||||
|
||||
AddAssert("local room has correct settings", () =>
|
||||
{
|
||||
@ -644,7 +644,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddUntilStep("wait for join", () => client.Room != null);
|
||||
AddUntilStep("wait for join", () => roomManager.RoomJoined);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user