diff options
author | Binbin <binloveplay1314@qq.com> | 2022-01-12 04:43:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 22:43:18 +0200 |
commit | e22146b07a8b5adc37e0153def1783406eb6d27c (patch) | |
tree | 2e5fbac3acb663ed4931575d58aeecc4d3045de3 /src/db.c | |
parent | 6790d848c5cf76ad5833d155fc4debc50b9ef2c4 (diff) | |
download | redis-e22146b07a8b5adc37e0153def1783406eb6d27c.tar.gz |
Add script tests to cover keys with expiration time set (#10096)
This commit adds some tests that the test cases will
access the keys with expiration time set in the script call.
There was no test case for this part before. See #10080
Also there is a test will cover #1525. we block the time so
that the key can not expire in the middle of the script execution.
Other changes:
1. Delete `evalTimeSnapshot` and just use `scriptTimeSnapshot` in it's place.
2. Some cleanups to scripting.tcl.
3. better names for tests that run in a loop to make them distinctable
Diffstat (limited to 'src/db.c')
-rw-r--r-- | src/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1559,7 +1559,7 @@ int keyIsExpired(redisDb *db, robj *key) { * script execution, making propagation to slaves / AOF consistent. * See issue #1525 on Github for more information. */ if (server.script_caller) { - now = evalTimeSnapshot(); + now = scriptTimeSnapshot(); } /* If we are in the middle of a command execution, we still want to use * a reference time that does not change: in that case we just use the |