Skip to content

Commit

Permalink
Increased delay on HashSetMultipleValues_HashGetMultipleValues_Should…
Browse files Browse the repository at this point in the history
…Insert_Async
  • Loading branch information
imperugo committed Jan 20, 2025
1 parent 5433629 commit d6f8458
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using System.Collections.Generic;
using System.Threading.Tasks;

using StackExchange.Redis.Extensions.Core.Tests.Helpers;

using Xunit;

using static System.Linq.Enumerable;
Expand Down Expand Up @@ -79,18 +81,18 @@ public async Task HashSetMultipleValues_HashGetMultipleValues_ShouldInsert_Async
{
// arrange
var hashKey = Guid.NewGuid().ToString();
var values = Range(0, 100).Select(_ => new Helpers.TestClass<DateTime>(Guid.NewGuid().ToString(), DateTime.UtcNow));
var values = Range(0, 100).Select(_ => new TestClass<DateTime>(Guid.NewGuid().ToString(), DateTime.UtcNow));
var map = values.ToDictionary(_ => Guid.NewGuid().ToString());

// act
await Sut.GetDefaultDatabase().HashSetAsync(hashKey, map);
await Task.Delay(500);
await Task.Delay(1000);

// assert
var data = (await db
.HashGetAsync(hashKey, map.Keys.Select(x => (RedisValue)x).ToArray()))
.ToList()
.ConvertAll(x => serializer.Deserialize<Helpers.TestClass<DateTime>>(x!));
.ConvertAll(x => serializer.Deserialize<TestClass<DateTime>>(x!));

Assert.Equal(map.Count, data.Count);

Expand Down

0 comments on commit d6f8458

Please sign in to comment.