Skip to content

Commit b15207c

Browse files
committed
Fix the test that could not see that the defragged number of strings was greater than 0
1 parent 026119f commit b15207c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/modules/defragtest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ static void createGlobalStrings(RedisModuleCtx *ctx, unsigned long count)
4343
global_strings = RedisModule_Alloc(sizeof(RedisModuleString *) * count);
4444

4545
for (unsigned long i = 0; i < count; i++) {
46-
global_strings[i] = RedisModule_CreateStringFromLongLong(ctx, i);
46+
char buf[64] = {0};
47+
global_strings[i] = RedisModule_CreateString(ctx, buf, 64);
4748
}
4849
}
4950

0 commit comments

Comments
 (0)