test: fix flaky test-fs-watch-encoding on OS X
Checklist
-
make -j4 test
(UNIX) orvcbuild test nosign
(Windows) passes -
the commit message follows commit guidelines
Affected core subsystem(s)
test fs
Description of change
Depends on #7327. More info after that lands...
Copy of shell script used to stress test locally for the problem:
#!/bin/bash
BASE_PATH=./test/parallel
TEST=$1
COPIES=$2
for i in `seq 1 $COPIES`;
do
cp $BASE_PATH/$TEST.js $BASE_PATH/$TEST-$i.js
done
runcount=1
while true; do
echo "Run ${runcount}"
/usr/bin/python tools/test.py --timeout=5 --mode=release parallel/${TEST}* -J
if [ $? -ne 0 ]; then
break
fi
((runcount++))
done
Script (named stress.sh
in the project root) instantiated with: bash stress.sh test-fs-watch-encoding 4
Without change in this PR, it fails after a handful of runs, usually less than 10 and never more than 100. With this change, it does not seem to fail at all.