Skip to content

Commit aa5c348

Browse files
Fix CI stability and code quality issues
- Resolve CS0246 and IDE0005 in TestRoomRequestsHandler by using fully qualified names and removing unnecessary usings. - Fix IDE0055 formatting in SpectatorClient.BeginPlaying. - Correct operator precedence and clean up clone logic in TestMultiplayerClient. - Fix MSBuild unrecognized attribute error in osu.Android.props by moving TrimmerRootAssembly to ItemGroup. - Maintain Android 16 compatibility workarounds (extractNativeLibs, page-size checks).
1 parent 5a62079 commit aa5c348

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

osu.Android.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@
164164
</PropertyGroup>
165165

166166
<ItemGroup Condition="'$(Configuration)' == 'Release'">
167-
<!-- Root Microsoft.CSharp to prevent XACAS7023 DirectoryNotFoundException. -->
168167
<TrimmerRootAssembly Include="Microsoft.CSharp" RootMode="all" />
168+
<!-- Root Microsoft.CSharp to prevent XACAS7023 DirectoryNotFoundException. -->
169169
<!-- Explicitly reference Microsoft.CSharp for the trimmer. -->
170170
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" NoWarn="NU1510" />
171171
</ItemGroup>

osu.Game/Tests/Visual/OnlinePlay/TestRoomRequestsHandler.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
using osu.Game.Online.API.Requests;
1010
using osu.Game.Online.API.Requests.Responses;
1111
using osu.Game.Online.Rooms;
12-
using osu.Game.Tests.Beatmaps;
13-
using osu.Game.Tests.Visual;
1412

1513
namespace osu.Game.Tests.Visual.OnlinePlay
1614
{
@@ -33,16 +31,18 @@ public bool HandleRequest(APIRequest request, APIUser localUser, BeatmapManager
3331
{
3432
case CreateRoomRequest createRoomRequest:
3533
{
36-
var apiRoom = cloneRoom(createRoomRequest.Room);
34+
var apiRoom = createRoomRequest.Room;
35+
var responseRoom = cloneRoom(apiRoom);
3736

38-
// Passwords are explicitly not copied between rooms.
39-
apiRoom.Password = createRoomRequest.Room.Password;
37+
responseRoom.RoomID = currentRoomId++;
38+
responseRoom.Host = localUser;
4039

41-
AddServerSideRoom(apiRoom, localUser);
40+
foreach (var item in responseRoom.Playlist)
41+
{
42+
item.ID = currentPlaylistItemId++;
43+
}
4244

43-
var responseRoom = new APICreatedRoom();
44-
if (createResponseRoom(apiRoom, false) is Room res)
45-
responseRoom.CopyFrom(res);
45+
ServerSideRooms.Add(responseRoom);
4646

4747
// Propagate back to the source room object used by the test.
4848
createRoomRequest.Room.RoomID = apiRoom.RoomID;
@@ -213,12 +213,12 @@ private static List<APIBeatmap> createResponseBeatmaps(BeatmapManager beatmapMan
213213

214214
if (baseBeatmap == null)
215215
{
216-
baseBeatmap = new TestBeatmap(new RulesetInfo { OnlineID = 0 }).BeatmapInfo;
216+
baseBeatmap = new osu.Game.Tests.Beatmaps.TestBeatmap(new osu.Game.Rulesets.RulesetInfo { OnlineID = 0 }).BeatmapInfo;
217217
baseBeatmap.OnlineID = id;
218218
baseBeatmap.BeatmapSet!.OnlineID = id;
219219
}
220220

221-
result.Add(OsuTestScene.CreateAPIBeatmap(baseBeatmap));
221+
result.Add(osu.Game.Tests.Visual.OsuTestScene.CreateAPIBeatmap(baseBeatmap));
222222
}
223223

224224
return result;

0 commit comments

Comments
 (0)