Handle score submission request in submission test scene

Was previously not handled at all, therefore displaying request failures
in the test log output. While that was mostly a red herring and
shouldn't have caused any actual *test* failures, it is still better to
handle this explicitly in a realistic manner.
This commit is contained in:
Bartłomiej Dach
2022-01-06 12:57:26 +01:00
parent a9e4a0fd61
commit 84765b99b3
2 changed files with 42 additions and 17 deletions

View File

@ -12,17 +12,17 @@ namespace osu.Game.Online.Solo
{
public class SubmitSoloScoreRequest : APIRequest<MultiplayerScore>
{
public readonly SubmittableScore Score;
private readonly long scoreId;
private readonly int beatmapId;
private readonly SubmittableScore score;
public SubmitSoloScoreRequest(int beatmapId, long scoreId, ScoreInfo scoreInfo)
{
this.beatmapId = beatmapId;
this.scoreId = scoreId;
score = new SubmittableScore(scoreInfo);
Score = new SubmittableScore(scoreInfo);
}
protected override WebRequest CreateWebRequest()
@ -33,7 +33,7 @@ namespace osu.Game.Online.Solo
req.Method = HttpMethod.Put;
req.Timeout = 30000;
req.AddRaw(JsonConvert.SerializeObject(score, new JsonSerializerSettings
req.AddRaw(JsonConvert.SerializeObject(Score, new JsonSerializerSettings
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
}));