diff --git a/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs b/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs index a4d3cf1f31..3fe35dc9a7 100644 --- a/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs +++ b/Content.IntegrationTests/Tests/DoAfter/DoAfterServerTest.cs @@ -42,7 +42,10 @@ namespace Content.IntegrationTests.Tests.DoAfter }); await server.WaitRunTicks(1); + Assert.That(task.Status, Is.EqualTo(TaskStatus.RanToCompletion)); +#pragma warning disable RA0004 Assert.That(task.Result == DoAfterStatus.Finished); +#pragma warning restore RA0004 await pairTracker.CleanReturnAsync(); } @@ -69,7 +72,10 @@ namespace Content.IntegrationTests.Tests.DoAfter }); await server.WaitRunTicks(3); - Assert.That(task.Result == DoAfterStatus.Cancelled, $"Result was {task.Result}"); + Assert.That(task.Status, Is.EqualTo(TaskStatus.RanToCompletion)); +#pragma warning disable RA0004 + Assert.That(task.Result, Is.EqualTo(DoAfterStatus.Cancelled), $"Result was {task.Result}"); +#pragma warning restore RA0004 await pairTracker.CleanReturnAsync(); } diff --git a/Content.Server/DoAfter/DoAfter.cs b/Content.Server/DoAfter/DoAfter.cs index 05c927ff35..61f4e009ae 100644 --- a/Content.Server/DoAfter/DoAfter.cs +++ b/Content.Server/DoAfter/DoAfter.cs @@ -22,7 +22,9 @@ namespace Content.Server.DoAfter public EntityCoordinates TargetGrid { get; } +#pragma warning disable RA0004 public DoAfterStatus Status => AsTask.IsCompletedSuccessfully ? AsTask.Result : DoAfterStatus.Running; +#pragma warning restore RA0004 // NeedHand private readonly string? _activeHand; diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 14e44bcebc..6c0357e5c0 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -156,11 +156,13 @@ namespace Content.Server.GameTicking // TODO FIXME AAAAAAAAAAAAAAAAAAAH THIS IS BROKEN // Task.Run as a terrible dirty workaround to avoid synchronization context deadlock from .Result here. // This whole setup logic should be made asynchronous so we can properly wait on the DB AAAAAAAAAAAAAH +#pragma warning disable RA0004 RoundId = Task.Run(async () => { var server = await _db.AddOrGetServer(serverName); return await _db.AddNewRound(server, playerIds); }).Result; +#pragma warning restore RA0004 var startingEvent = new RoundStartingEvent(RoundId); RaiseLocalEvent(startingEvent);