retry building the quick connect store in the startup probe, not just reading it
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

This commit is contained in:
2026-09-26 22:56:28 +10:00
parent 6c7f76fd26
commit 33a5fbce9b
4 changed files with 76 additions and 16 deletions
@@ -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(