Skip to content

Commit 3e4daab

Browse files
committed
fixed test for periodic timer
1 parent 15cf5ea commit 3e4daab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rmutil/test_periodic.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ void timerCb(RedisModuleCtx *ctx, void *p) {
1212

1313
int testPeriodic() {
1414
int x = 0;
15-
struct RMUtilTimer *tm =
16-
RMUtil_NewPeriodicTimer(timerCb, &x, (struct timespec){.tv_sec = 0, .tv_nsec = 10000000});
15+
struct RMUtilTimer *tm = RMUtil_NewPeriodicTimer(
16+
timerCb, NULL, &x, (struct timespec){.tv_sec = 0, .tv_nsec = 10000000});
1717

1818
sleep(1);
1919

20-
ASSERT_EQUAL(0, RMUtilTimer_Stop(tm));
20+
ASSERT_EQUAL(0, RMUtilTimer_Terminate(tm));
2121
ASSERT(x > 0);
2222
ASSERT(x <= 100);
23-
RMUtilTimer_Free(tm);
2423
return 0;
2524
}
2625

0 commit comments

Comments
 (0)