You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ptupitsyn (via GitHub)" <gi...@apache.org> on 2026/02/25 13:17:30 UTC
[PR] IGNITE-27861 .NET: Fix TestSlidingExpiration flakiness [ignite-3]
ptupitsyn opened a new pull request, #7665:
URL: https://github.com/apache/ignite-3/pull/7665
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27861 .NET: Fix TestSlidingExpiration flakiness [ignite-3]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #7665:
URL: https://github.com/apache/ignite-3/pull/7665#discussion_r2853795007
##########
modules/platforms/dotnet/Apache.Extensions.Caching.Ignite.Tests/IgniteDistributedCacheTests.cs:
##########
@@ -276,21 +276,21 @@ public async Task TestSlidingExpiration()
var entryOptions = new DistributedCacheEntryOptions
{
- SlidingExpiration = TimeSpan.FromSeconds(0.5)
+ SlidingExpiration = TimeSpan.FromSeconds(1)
};
await cache.SetAsync("x", [1], entryOptions);
Assert.IsNotNull(await cache.GetAsync("x"));
// Access before expiration to reset the timer.
- for (int i = 0; i < 7; i++)
+ for (int i = 0; i < 15; i++)
{
await Task.Delay(TimeSpan.FromSeconds(0.1));
Assert.IsNotNull(await cache.GetAsync("x"));
}
// Wait for expiration without accessing.
- await Task.Delay(TimeSpan.FromSeconds(0.7));
+ await Task.Delay(TimeSpan.FromSeconds(1.5));
Assert.IsNull(await cache.GetAsync("x"));
Review Comment:
Consider using TestUtils.WaitForConditionAsync instead of fixed Task.Delay for the final expiration check. This would make the test more resilient to timing variations across different environments. The pattern is used in TestAbsoluteExpirationRelativeToNow (line 250) where expiration is checked with polling rather than a fixed delay.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org