Skip to content

Commit

Permalink
updating StackExchange.Redis Version to remove System.Drawing depende…
Browse files Browse the repository at this point in the history
…ncy (#436)

* updating StackExchange.Redis Version to remove System.Drawing dependency.
  • Loading branch information
slorello89 committed Apr 12, 2024
1 parent d43d4b2 commit fd31129
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Redis.OM.POC/Redis.OM.POC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="StackExchange.Redis" Version="2.5.61" />
<PackageReference Include="StackExchange.Redis" Version="2.7.17" />
<PackageReference Include="System.IO.Pipelines" Version="5.0.1" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Redis.OM/Redis.OM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="StackExchange.Redis" Version="2.5.61" />
<PackageReference Include="StackExchange.Redis" Version="2.7.17" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
<PackageReference Include="Ulid" Version="1.2.6" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
Expand Down
10 changes: 5 additions & 5 deletions src/Redis.OM/RedisReply.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ public class RedisReply : IConvertible
/// <param name="result">the redisResult.</param>
public RedisReply(RedisResult result)
{
switch (result.Type)
switch (result.Resp2Type)
{
case ResultType.None:
break;
case ResultType.SimpleString:
case ResultType.BulkString:
_raw = (byte[])result;
_raw = (byte[])result!;
break;
case ResultType.Error:
Error = true;
_raw = (byte[])result;
_raw = (byte[])result!;
break;
case ResultType.Integer:
_internalLong = (long)result;
break;
case ResultType.MultiBulk:
_values = ((RedisResult[])result).Select(x => new RedisReply(x)).ToArray();
case ResultType.Array:
_values = ((RedisResult[])result!).Select(x => new RedisReply(x)).ToArray();
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/Redis.OM.Unit.Tests/CoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ public async Task SearchTimeoutTest()

await Task.WhenAll(tasks);

var ex = await Assert.ThrowsAsync<TimeoutException>(async () => await collection.Take(10000).ToListAsync());
Assert.Equal("Encountered timeout when searching - check the duration of your query.", ex.Message);
var ex = await Assert.ThrowsAsync<Exception>(async () => await collection.Take(10000).ToListAsync());
Assert.True(ex.Message.Equals("Encountered timeout when searching - check the duration of your query.") || ex.Message.Contains("Timeout limit was reached"));
}
}
}

0 comments on commit fd31129

Please sign in to comment.