Created
August 3, 2023 20:14
-
-
Save slorello89/3f45c28e20832f24b571d759364c02ee to your computer and use it in GitHub Desktop.
resp2_resp3_adhoc_incompatibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Theory] | |
[InlineData(true)] | |
[InlineData(false)] | |
public void TryBreakResp3(bool useResp3) | |
{ | |
var muxer = Fixture.GetConnection(this, useResp3); | |
var db = muxer.GetDatabase(); | |
db.Execute("DEL", "zset:1"); | |
db.Execute("ZADD", "zset:1", 4, "foo"); | |
var result = db.Execute("ZRANGE", "zset:1", 0, -1, "WITHSCORES"); | |
#pragma warning disable CS0618 | |
Assert.Equal(ResultType.BulkString, ((RedisResult[])result)![1].Type); // works with RESP2 | |
// Assert.Equal(ResultType.Double, ((RedisResult[])(RedisResult[])result[0]!)[1].Resp3Type); // this works with RESP3 | |
#pragma warning restore CS0618 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment