Redis Expiry (#YZ1) Challenge (New testcase suggestion)

I think there should be a testcase where if I do

set key value px 5000

and then immediately do

set key value px 10000

I am technically setting a new expiry time for same key. The test cases don’t cover this. The key should expire after 10 seconds and not 5 seconds.

PR submitted.

Redis expiry test updated

Hey @NexFlare! Thanks for reporting this, valid case indeed.

The tester logic is intentionally minimal here, we try to not cover too many cases since it can be distracting from the overall goal. We might extract a separate “Expiry” extension at some point, where it’d make more sense to have detailed test cases. We have also been thinking about an “optional/bonus test cases” feature at some point where you can intentionally choose to have more edge cases thrown at your implementation to handle them.

I’ve added an internal +1 for both of these, and we’ll keep your suggested test case in mind when we do end up working on them!

Note: I’ve updated the title of this post to include the stage ID (#YZ1). You can learn about the stages rename here: Upcoming change: Stages overhaul