test(adminui): review fixes — locked-snapshot assert, stable fake health, InitializeCount property
This commit is contained in:
@@ -172,7 +172,7 @@ public sealed class DriverReconnectE2eTests
|
||||
List<DriverHealthChanged> snapshot;
|
||||
lock (captureLock) snapshot = captured.Where(c => c.DriverInstanceId == DriverId).ToList();
|
||||
|
||||
HasReconnectThenHealthy(captured).ShouldBeTrue(
|
||||
HasReconnectThenHealthy(snapshot).ShouldBeTrue(
|
||||
"Expected a Reconnecting push followed by a later Healthy push for the deployed driver. " +
|
||||
$"States seen: [{string.Join(", ", snapshot.Select(c => c.State))}]");
|
||||
|
||||
@@ -254,6 +254,8 @@ public sealed class DriverReconnectE2eTests
|
||||
await db.SaveChangesAsync(Ct);
|
||||
}
|
||||
|
||||
/// <summary>Polls <paramref name="condition"/> every 100 ms until it returns true or
|
||||
/// <paramref name="timeout"/> elapses (then throws <see cref="TimeoutException"/>).</summary>
|
||||
private static async Task WaitForAsync(Func<Task<bool>> condition, TimeSpan timeout)
|
||||
{
|
||||
var deadline = DateTime.UtcNow + timeout;
|
||||
|
||||
Reference in New Issue
Block a user