Skip to content

Commit

Permalink
Redis 7.2.0 RC1: Prep for upgrades (#2454)
Browse files Browse the repository at this point in the history
I'm seeing a few issues here that we need to resolve for the upcoming Redis 7.2 release:
- [x] The internal encoding has changed 1 spot to listpack, which is correct from redis/redis#11303, but is missing in the docs at https://redis.io/commands/object-encoding/ (fixed in tests themselves)
- [x] The `HackyGetPerf` reliably returns 0 now, regardless of how long has passed (e.g. upping iterations tremendously)...this may legit be bugged.
- [x] `StreamAutoClaim_IncludesDeletedMessageId` expectations are broken, not sure what to make of this yet but it's an odd change to hit between 7.0 and 7.2 versions.

Note: no release notes because these are all test tweaks.

Co-authored-by: slorello89 <steve.lorello@redis.com>
  • Loading branch information
NickCraver and slorello89 committed Jun 14, 2023
1 parent a1ccdc2 commit f6171a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion tests/RedisConfigs/Dockerfile
@@ -1,4 +1,4 @@
FROM redis:7.0-rc3
FROM redis:7.2-rc1

COPY Basic /data/Basic/
COPY Failover /data/Failover/
Expand Down
2 changes: 1 addition & 1 deletion tests/StackExchange.Redis.Tests/KeyTests.cs
Expand Up @@ -272,7 +272,7 @@ public async Task KeyEncoding()
db.ListLeftPush(key, "new value", flags: CommandFlags.FireAndForget);

// Depending on server version, this is going to vary - we're sanity checking here.
var listTypes = new [] { "ziplist", "quicklist" };
var listTypes = new [] { "ziplist", "quicklist", "listpack" };
Assert.Contains(db.KeyEncoding(key), listTypes);
Assert.Contains(await db.KeyEncodingAsync(key), listTypes);

Expand Down
21 changes: 0 additions & 21 deletions tests/StackExchange.Redis.Tests/ScriptingTests.cs
Expand Up @@ -97,27 +97,6 @@ public async Task TestRandomThingFromForum()
Assert.Equal("4", vals[2]);
}

[Fact]
public void HackyGetPerf()
{
using var conn = GetScriptConn();

var key = Me();
var db = conn.GetDatabase();
db.StringSet(key + "foo", "bar", flags: CommandFlags.FireAndForget);
var result = (long)db.ScriptEvaluate(@"
redis.call('psetex', KEYS[1], 60000, 'timing')
for i = 1,5000 do
redis.call('set', 'ignore','abc')
end
local timeTaken = 60000 - redis.call('pttl', KEYS[1])
redis.call('del', KEYS[1])
return timeTaken
", new RedisKey[] { key }, null);
Log(result.ToString());
Assert.True(result > 0);
}

[Fact]
public async Task MultiIncrWithoutReplies()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/StackExchange.Redis.Tests/StreamTests.cs
Expand Up @@ -290,7 +290,7 @@ public void StreamAutoClaim_IncludesDeletedMessageId()
db.StreamDelete(key, new RedisValue[] { messageIds[0] });

// Claim a single pending message and reassign it to consumer2.
var result = db.StreamAutoClaim(key, group, consumer2, 0, "0-0", count: 1);
var result = db.StreamAutoClaim(key, group, consumer2, 0, "0-0", count: 2);

Assert.Equal("0-0", result.NextStartId);
Assert.NotEmpty(result.ClaimedEntries);
Expand Down Expand Up @@ -318,7 +318,7 @@ public async Task StreamAutoClaim_IncludesDeletedMessageIdAsync()
db.StreamDelete(key, new RedisValue[] { messageIds[0] });

// Claim a single pending message and reassign it to consumer2.
var result = await db.StreamAutoClaimAsync(key, group, consumer2, 0, "0-0", count: 1);
var result = await db.StreamAutoClaimAsync(key, group, consumer2, 0, "0-0", count: 2);

Assert.Equal("0-0", result.NextStartId);
Assert.NotEmpty(result.ClaimedEntries);
Expand Down

0 comments on commit f6171a1

Please sign in to comment.