=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -21,6 +21,7 @@ public class RedisLockProviderTest
/// <summary>
/// Initializes the test environment by creating a mock <see cref="IDatabase"/> and instantiating a <see cref="RedisLockProvider"/> configured to use the mocked database.
/// </summary>
/// <!-- aidoc:v1 sig=d8eb19f body=aaffb29 -->
[SetUp]
public void SetUp()
{
@@ -32,6 +33,7 @@ public class RedisLockProviderTest
/// <summary>
/// Verifies that <c>AcquireAsync</c> returns <c>true</c>, stores the lock token under the <c>lock:</c> prefixed key, applies the configured TTL, and uses the <c>When.NotExists</c> flag when Redis accepts the NX SET operation. Also asserts that a subsequent <c>ReleaseAsync</c> invokes the Redis release script.
/// </summary>
/// <!-- aidoc:v1 sig=70f9b70 body=cb5fcc3 -->
[Test]
public async Task AcquireAsync_ReturnsTrue_AndStoresToken_WhenRedisAcceptsNxSet()
{
@@ -78,6 +80,7 @@ public class RedisLockProviderTest
/// Asserts the call is retried the expected number of times and that the elapsed time confirms
/// delays were actually applied between attempts.
/// </summary>
/// <!-- aidoc:v1 sig=d11d703 body=9ec3583 -->
[Test]
public async Task AcquireAsync_RetriesWithDelays_UntilNxSucceeds()
{
@@ -112,6 +115,7 @@ public class RedisLockProviderTest
/// <summary>
/// Verifies that AcquireAsync returns <c>false</c> and performs multiple retry attempts when the underlying lock acquisition operation consistently fails within the specified timeout.
/// </summary>
/// <!-- aidoc:v1 sig=b5c5d4f body=131b234 -->
[Test]
public async Task AcquireAsync_ReturnsFalse_AfterTimeoutWithMultipleRetries()
{
@@ -142,6 +146,7 @@ public class RedisLockProviderTest
/// <summary>
/// Verifies that releasing a lock invokes the Lua script evaluation with the correct lock key (prefixed with "lock:") and the token previously captured during lock acquisition.
/// </summary>
/// <!-- aidoc:v1 sig=a27fd67 body=af51113 -->
[Test]
public async Task ReleaseAsync_CallsScriptEvaluateWithCorrectKeyAndToken()
{
@@ -181,6 +186,7 @@ public class RedisLockProviderTest
/// Verifies that ReleaseAsync is idempotent when invoked without a prior acquire operation,
/// ensuring that no script evaluation is performed on the underlying database in this scenario.
/// </summary>
/// <!-- aidoc:v1 sig=34ada35 body=27f9924 -->
[Test]
public async Task ReleaseAsync_IsIdempotent_WhenCalledWithoutPriorAcquire()
{