Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d2c5f80e
Unverified
Commit
d2c5f80e
authored
Feb 27, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Feb 27, 2020
Browse files
Merge pull request #6926 from oranagra/fork-test-fix
fix race in module api test for fork
parents
79de8f3c
0a643efa
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/modules/fork.c
View file @
d2c5f80e
...
...
@@ -42,7 +42,7 @@ int fork_create(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
/* child */
RedisModule_Log
(
ctx
,
"notice"
,
"fork child started"
);
usleep
(
2
00000
);
usleep
(
5
00000
);
RedisModule_Log
(
ctx
,
"notice"
,
"fork child exiting"
);
RedisModule_ExitFromChild
(
code_to_exit_with
);
/* unreachable */
...
...
tests/unit/moduleapi/fork.tcl
View file @
d2c5f80e
...
...
@@ -20,9 +20,8 @@ start_server {tags {"modules"}} {
test
{
Module fork kill
}
{
r fork.create 3
after 20
after 2
5
0
r fork.kill
after 100
assert
{[
count_log_message
"fork child started"
]
eq
"2"
}
assert
{[
count_log_message
"Received SIGUSR1 in child"
]
eq
"1"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment