retry building the quick connect store in the startup probe, not just reading it
This commit is contained in:
@@ -108,9 +108,11 @@ public sealed class QuickConnectStoreWiringTests : IAsyncLifetime
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An unreachable connection string that connects eagerly, the default, cannot even build the store.
|
||||
/// The lazily connecting form a deployment uses builds one, and the startup read in
|
||||
/// <see cref="QuickConnectStartupTests"/> is what stops the server coming up on that.
|
||||
/// An unreachable connection string that connects eagerly, the default, throws while the store is
|
||||
/// being built rather than on a read. A failed singleton factory is not cached, so every resolve
|
||||
/// throws afresh, which is what lets the startup probe in <see cref="QuickConnectStartupTests"/>
|
||||
/// retry the build and report an eager store's outage as the same operator-facing failure it reports
|
||||
/// for the lazily connecting form.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void UnreachableRedisAtStartup_FailsClosed()
|
||||
@@ -120,6 +122,7 @@ public sealed class QuickConnectStoreWiringTests : IAsyncLifetime
|
||||
using var provider = BuildProvider();
|
||||
|
||||
Assert.ThrowsAny<RedisConnectionException>(() => provider.GetRequiredService<IQuickConnectStore>());
|
||||
Assert.ThrowsAny<RedisConnectionException>(() => provider.GetRequiredService<IQuickConnectStore>());
|
||||
}
|
||||
|
||||
private static QuickConnectResult NewRequest() => new QuickConnectResult(
|
||||
|
||||
Reference in New Issue
Block a user