redis/tests/unit/moduleapi
debing.sun e750c619b2
Fix some test failures caused by key being deleted due to premature expiration (#13453)
1. Fix fuzzer test failure when the key was deleted due to expiration
before sending random traffic for the key.

After HFE, when all fields in a hash are expired, the hash might be
deleted due to expiration.

If the key was expired in the mid of `RESTORE` command and sending rand
trafic, `fuzzer` test will fail in the following code because the 'TYPE
key' will return `none` and then throw an exception because it cannot be
found in `$commands`

94b9072e44/tests/support/util.tcl (L712-L713)

This PR adds a `None` check for the reply of `KEY TYPE` command and adds
a print of `err` to avoid false positives in the future.

failed CI:
https://github.com/redis/redis/actions/runs/10127334121/job/28004985388

2. Fix the issue where key was deleted due to expiration before the
`scan.scan_key` command could execute, caused by premature enabling of
`set-active-expire`.

failed CI:
https://github.com/redis/redis/actions/runs/10153722715/job/28077610552

---------

Co-authored-by: oranagra <oran@redislabs.com>
2024-07-31 08:15:39 +08:00
..
aclcheck.tcl Allows modules to declare new ACL categories. (#12486) 2023-08-30 13:01:24 -07:00
async_rm_call.tcl Before evicted and before expired server events are not executed inside an execution unit. (#12733) 2023-11-08 09:28:22 +02:00
auth.tcl Fix module redact test for valgrind (#10432) 2022-03-16 08:53:57 +02:00
basics.tcl Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
blockedclient.tcl Fix timing issue in blockedclient test (#13071) 2024-02-20 08:43:13 +02:00
blockonbackground.tcl Fix external test hang in redis-cli test when run in a certain order (#13423) 2024-07-17 15:42:28 +03:00
blockonkeys.tcl Modules: Unblock from within a timer coverage (#12337) 2023-06-22 23:15:16 +03:00
cluster.tcl Fix delKeysInSlot server events are not executed inside an execution unit (#12745) 2023-12-11 20:15:19 +02:00
cmdintrospection.tcl Add reply_schema to command json files (internal for now) (#10273) 2023-03-11 10:14:16 +02:00
commandfilter.tcl Un-register notification and server event when RedisModule_OnLoad fails (#12809) 2023-11-27 17:26:33 +02:00
crash.tcl Address some failures with new tests for improving debug report (#12915) 2024-01-08 17:56:06 -08:00
datatype.tcl improve performance for scan command when matching pattern or data type (#12209) 2023-06-27 16:43:46 +03:00
datatype2.tcl Tests: don't rely on the response of MEMORY USAGE when mem_allocator is not jemalloc (#10010) 2021-12-27 21:37:21 +02:00
defrag.tcl Tests: fix new defrag test to be skipped when not supported (#8185) 2020-12-14 11:13:46 +02:00
eventloop.tcl sub-command support for ACL CAT and COMMAND LIST. redisCommand always stores fullname (#10127) 2022-01-23 10:05:06 +02:00
fork.tcl Fix async safety in signal handlers (#12658) 2023-11-23 13:22:20 +02:00
getchannels.tcl Implemented module getchannels api and renamed channel keyspec (#10299) 2022-02-22 11:00:03 +02:00
getkeys.tcl Unify ACL failure error messaging. (#11160) 2022-10-16 09:01:37 +03:00
hash.tcl HFE - Avoid lazy expire if called by modules + cleanup (#13326) 2024-06-10 11:24:26 +03:00
hooks.tcl Un-register notification and server event when RedisModule_OnLoad fails (#12809) 2023-11-27 17:26:33 +02:00
infotest.tcl Fix missing sections for INFO ALL with module (#11291) 2022-09-21 08:10:03 +03:00
infra.tcl Build TLS as a loadable module 2022-08-23 12:37:56 +03:00
keyspace_events.tcl Un-register notification and server event when RedisModule_OnLoad fails (#12809) 2023-11-27 17:26:33 +02:00
keyspecs.tcl Unify ACL failure error messaging. (#11160) 2022-10-16 09:01:37 +03:00
list.tcl Add listpack encoding for list (#11303) 2022-11-16 20:29:46 +02:00
mallocsize.tcl Add RM_MallocSizeString, RM_MallocSizeDict (#10542) 2022-04-17 08:31:57 +03:00
misc.tcl Add API RedisModule_ClusterKeySlot and RedisModule_ClusterCanonicalKeyNameInSlot (#13069) 2024-03-12 09:26:12 -07:00
moduleauth.tcl Custom authentication for Modules (#11659) 2023-03-15 15:18:42 -07:00
moduleconfigs.tcl Module commands to have ACL categories. (#11708) 2023-03-21 10:07:11 -07:00
postnotifications.tcl Before evicted and before expired server events are not executed inside an execution unit. (#12733) 2023-11-08 09:28:22 +02:00
propagate.tcl Don't keep global replication buffer reference for replicas marked CLIENT_CLOSE_ASAP (#13363) 2024-06-26 08:26:23 +08:00
publish.tcl Fix broken protocol when PUBLISH emits local push inside MULTI (#12326) 2023-06-20 20:41:41 +03:00
rdbloadsave.tcl Add RM_RdbLoad and RM_RdbSave module API functions (#11852) 2023-04-09 12:07:32 +03:00
reply.tcl Align RM_ReplyWithErrorFormat with RM_ReplyWithError (#12321) 2023-06-20 20:44:43 +03:00
scan.tcl Fix some test failures caused by key being deleted due to premature expiration (#13453) 2024-07-31 08:15:39 +08:00
stream.tcl Delete empty key if fails after moduleCreateEmptyKey() in module (#12129) 2023-05-07 10:13:19 +03:00
subcommands.tcl Fix regression not aborting transaction on error, and re-edit some error responses (#10612) 2022-04-25 13:08:13 +03:00
test_lazyfree.tcl Sort out mess around propagation and MULTI/EXEC (#9890) 2021-12-23 00:03:48 +02:00
testrdb.tcl Tests: Do not save an RDB by default and add a SIGTERM default AOFRW test (#12064) 2023-04-18 16:14:26 +03:00
timer.tcl forbid module to unload when it holds ongoing timer (#10187) 2022-02-01 14:54:11 +02:00
usercall.tcl WAITAOF: Update fsynced_reploff_pending even if there's nothing to fsync (#12622) 2023-09-28 17:19:20 +03:00
zset.tcl Delete empty key if fails after moduleCreateEmptyKey() in module (#12129) 2023-05-07 10:13:19 +03:00