Skip to content

Commit f6171a1

Browse files
Redis 7.2.0 RC1: Prep for upgrades (#2454)
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 <[email protected]>
1 parent a1ccdc2 commit f6171a1

File tree

4 files changed

+4
-25
lines changed

4 files changed

+4
-25
lines changed

tests/RedisConfigs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM redis:7.0-rc3
1+
FROM redis:7.2-rc1
22

33
COPY Basic /data/Basic/
44
COPY Failover /data/Failover/

tests/StackExchange.Redis.Tests/KeyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public async Task KeyEncoding()
272272
db.ListLeftPush(key, "new value", flags: CommandFlags.FireAndForget);
273273

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

tests/StackExchange.Redis.Tests/ScriptingTests.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,6 @@ public async Task TestRandomThingFromForum()
9797
Assert.Equal("4", vals[2]);
9898
}
9999

100-
[Fact]
101-
public void HackyGetPerf()
102-
{
103-
using var conn = GetScriptConn();
104-
105-
var key = Me();
106-
var db = conn.GetDatabase();
107-
db.StringSet(key + "foo", "bar", flags: CommandFlags.FireAndForget);
108-
var result = (long)db.ScriptEvaluate(@"
109-
redis.call('psetex', KEYS[1], 60000, 'timing')
110-
for i = 1,5000 do
111-
redis.call('set', 'ignore','abc')
112-
end
113-
local timeTaken = 60000 - redis.call('pttl', KEYS[1])
114-
redis.call('del', KEYS[1])
115-
return timeTaken
116-
", new RedisKey[] { key }, null);
117-
Log(result.ToString());
118-
Assert.True(result > 0);
119-
}
120-
121100
[Fact]
122101
public async Task MultiIncrWithoutReplies()
123102
{

tests/StackExchange.Redis.Tests/StreamTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public void StreamAutoClaim_IncludesDeletedMessageId()
290290
db.StreamDelete(key, new RedisValue[] { messageIds[0] });
291291

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

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

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

323323
Assert.Equal("0-0", result.NextStartId);
324324
Assert.NotEmpty(result.ClaimedEntries);

0 commit comments

Comments
 (0)