mirror of https://mirror.osredm.com/root/redis.git
Fix failing basics moduleapi test on 32bit CI (#9140)
This commit is contained in:
parent
eb09fbce1e
commit
5ffdbae1f6
|
@ -333,6 +333,9 @@ int TestCtxFlags(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
|
||||||
flags = RedisModule_GetContextFlags(ctx);
|
flags = RedisModule_GetContextFlags(ctx);
|
||||||
if (!(flags & REDISMODULE_CTX_FLAGS_AOF)) FAIL("AOF Flag not set after config set");
|
if (!(flags & REDISMODULE_CTX_FLAGS_AOF)) FAIL("AOF Flag not set after config set");
|
||||||
|
|
||||||
|
/* Disable RDB saving and test the flag. */
|
||||||
|
RedisModule_Call(ctx, "config", "ccc", "set", "save", "");
|
||||||
|
flags = RedisModule_GetContextFlags(ctx);
|
||||||
if (flags & REDISMODULE_CTX_FLAGS_RDB) FAIL("RDB Flag was set");
|
if (flags & REDISMODULE_CTX_FLAGS_RDB) FAIL("RDB Flag was set");
|
||||||
/* Enable RDB to test RDB flags */
|
/* Enable RDB to test RDB flags */
|
||||||
RedisModule_Call(ctx, "config", "ccc", "set", "save", "900 1");
|
RedisModule_Call(ctx, "config", "ccc", "set", "save", "900 1");
|
||||||
|
@ -344,8 +347,12 @@ int TestCtxFlags(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
|
||||||
if (flags & REDISMODULE_CTX_FLAGS_READONLY) FAIL("Read-only flag was set");
|
if (flags & REDISMODULE_CTX_FLAGS_READONLY) FAIL("Read-only flag was set");
|
||||||
if (flags & REDISMODULE_CTX_FLAGS_CLUSTER) FAIL("Cluster flag was set");
|
if (flags & REDISMODULE_CTX_FLAGS_CLUSTER) FAIL("Cluster flag was set");
|
||||||
|
|
||||||
|
/* Disable maxmemory and test the flag. (it is implicitly set in 32bit builds. */
|
||||||
|
RedisModule_Call(ctx, "config", "ccc", "set", "maxmemory", "0");
|
||||||
|
flags = RedisModule_GetContextFlags(ctx);
|
||||||
if (flags & REDISMODULE_CTX_FLAGS_MAXMEMORY) FAIL("Maxmemory flag was set");
|
if (flags & REDISMODULE_CTX_FLAGS_MAXMEMORY) FAIL("Maxmemory flag was set");
|
||||||
|
|
||||||
|
/* Enable maxmemory and test the flag. */
|
||||||
RedisModule_Call(ctx, "config", "ccc", "set", "maxmemory", "100000000");
|
RedisModule_Call(ctx, "config", "ccc", "set", "maxmemory", "100000000");
|
||||||
flags = RedisModule_GetContextFlags(ctx);
|
flags = RedisModule_GetContextFlags(ctx);
|
||||||
if (!(flags & REDISMODULE_CTX_FLAGS_MAXMEMORY))
|
if (!(flags & REDISMODULE_CTX_FLAGS_MAXMEMORY))
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
set testmodule [file normalize tests/modules/basics.so]
|
set testmodule [file normalize tests/modules/basics.so]
|
||||||
|
|
||||||
|
|
||||||
# TEST.CTXFLAGS requires RDB to be disabled, so override save file
|
start_server {tags {"modules"}} {
|
||||||
start_server {tags {"modules"} overrides {save ""}} {
|
|
||||||
r module load $testmodule
|
r module load $testmodule
|
||||||
|
|
||||||
test {test module api basics} {
|
test {test module api basics} {
|
||||||
|
|
Loading…
Reference in New Issue