# HG changeset patch # User Pierre-Yves David # Date 1647525526 -3600 # Node ID bd752712ccaf711770d195bfaa8fb5a401df661d # Parent 877d7e1a4223fe7d8230b4edde07dedd80d671e3 test: use `wait-on-file` in `test-racy-mutations.t` The official utility scale its timeout with the run-tests.py one. So lets use it. Differential Revision: https://phab.mercurial-scm.org/D12382 diff -r 877d7e1a4223 -r bd752712ccaf tests/test-racy-mutations.t --- a/tests/test-racy-mutations.t Fri Mar 18 21:15:54 2022 -0700 +++ b/tests/test-racy-mutations.t Thu Mar 17 14:58:46 2022 +0100 @@ -14,14 +14,7 @@ > f="\${WAITLOCK_FILE}" > start=\`date +%s\` > timeout=5 - > while [ \\( ! -f \$f \\) -a \\( ! -L \$f \\) ]; do - > now=\`date +%s\` - > if [ "\`expr \$now - \$start\`" -gt \$timeout ]; then - > echo "timeout: \$f was not created in \$timeout seconds (it is now \$(date +%s))" - > exit 1 - > fi - > sleep 0.1 - > done + > $RUNTESTDIR/testlib/wait-on-file "\$timeout" "\$f" > if [ \$# -gt 1 ]; then > cat "\$@" > fi