Compat for Result Analyzer engine PR (#9966)
This commit is contained in:
committed by
GitHub
parent
0542726907
commit
de9df5386f
@@ -42,7 +42,10 @@ namespace Content.IntegrationTests.Tests.DoAfter
|
|||||||
});
|
});
|
||||||
|
|
||||||
await server.WaitRunTicks(1);
|
await server.WaitRunTicks(1);
|
||||||
|
Assert.That(task.Status, Is.EqualTo(TaskStatus.RanToCompletion));
|
||||||
|
#pragma warning disable RA0004
|
||||||
Assert.That(task.Result == DoAfterStatus.Finished);
|
Assert.That(task.Result == DoAfterStatus.Finished);
|
||||||
|
#pragma warning restore RA0004
|
||||||
|
|
||||||
await pairTracker.CleanReturnAsync();
|
await pairTracker.CleanReturnAsync();
|
||||||
}
|
}
|
||||||
@@ -69,7 +72,10 @@ namespace Content.IntegrationTests.Tests.DoAfter
|
|||||||
});
|
});
|
||||||
|
|
||||||
await server.WaitRunTicks(3);
|
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();
|
await pairTracker.CleanReturnAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ namespace Content.Server.DoAfter
|
|||||||
|
|
||||||
public EntityCoordinates TargetGrid { get; }
|
public EntityCoordinates TargetGrid { get; }
|
||||||
|
|
||||||
|
#pragma warning disable RA0004
|
||||||
public DoAfterStatus Status => AsTask.IsCompletedSuccessfully ? AsTask.Result : DoAfterStatus.Running;
|
public DoAfterStatus Status => AsTask.IsCompletedSuccessfully ? AsTask.Result : DoAfterStatus.Running;
|
||||||
|
#pragma warning restore RA0004
|
||||||
|
|
||||||
// NeedHand
|
// NeedHand
|
||||||
private readonly string? _activeHand;
|
private readonly string? _activeHand;
|
||||||
|
|||||||
@@ -156,11 +156,13 @@ namespace Content.Server.GameTicking
|
|||||||
// TODO FIXME AAAAAAAAAAAAAAAAAAAH THIS IS BROKEN
|
// TODO FIXME AAAAAAAAAAAAAAAAAAAH THIS IS BROKEN
|
||||||
// Task.Run as a terrible dirty workaround to avoid synchronization context deadlock from .Result here.
|
// 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
|
// 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 () =>
|
RoundId = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var server = await _db.AddOrGetServer(serverName);
|
var server = await _db.AddOrGetServer(serverName);
|
||||||
return await _db.AddNewRound(server, playerIds);
|
return await _db.AddNewRound(server, playerIds);
|
||||||
}).Result;
|
}).Result;
|
||||||
|
#pragma warning restore RA0004
|
||||||
|
|
||||||
var startingEvent = new RoundStartingEvent(RoundId);
|
var startingEvent = new RoundStartingEvent(RoundId);
|
||||||
RaiseLocalEvent(startingEvent);
|
RaiseLocalEvent(startingEvent);
|
||||||
|
|||||||
Reference in New Issue
Block a user