changeset 48977:bd752712ccaf stable

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 17 Mar 2022 14:58:46 +0100
parents 877d7e1a4223
children c80544aa4971 9120c0cd935c
files tests/test-racy-mutations.t
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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