diff options
author | Binbin <binloveplay1314@qq.com> | 2022-05-13 01:10:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 20:10:38 +0300 |
commit | 586a16ad7907d9742a63cfcec464be7ac54aa495 (patch) | |
tree | 726241825a61af44924b19021aeb159b74259bc2 /runtest-cluster | |
parent | b16d1c2713c2894eadc5d0973b37aeff76382985 (diff) | |
download | redis-586a16ad7907d9742a63cfcec464be7ac54aa495.tar.gz |
Fix race in module fork kill test (#10717)
The purpose of the test is to kill the child while it is running.
From the last two lines we can see the child exits before being killed.
```
- Module fork started pid: 56998
* <fork> fork child started
- Killing running module fork child: 56998
* <fork> fork child exiting
signal-handler (1652267501) Received SIGUSR1 in child, exiting now.
```
In this commit, we pass an argument to `fork.create` indicating how
long it should sleep. For the fork kill test, we use a longer time to
avoid the child exiting before being killed.
Other changes:
use wait_for_condition instead of hardcoded `after 250`.
Unify the test for failing fork with the one for killing it (save time)
Diffstat (limited to 'runtest-cluster')
0 files changed, 0 insertions, 0 deletions