wait-on-file: adjust the timer counter stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 16 Apr 2020 22:56:03 +0200
branchstable
changeset 44739 23dd43d94f50
parent 44738 036f6f7e19e1
child 44740 b4537125eb3c
wait-on-file: adjust the timer counter The wait performed in increment of 0.01 second, but the timer was expressed in second. So we did not wait 20s, we waited 0.2 second. Internally we adjust the counter to be expressed in centisecond. This prevent some flackyness in the test. Differential Revision: https://phab.mercurial-scm.org/D8453
tests/testlib/wait-on-file
--- a/tests/testlib/wait-on-file	Sun Apr 19 17:33:08 2020 -0700
+++ b/tests/testlib/wait-on-file	Thu Apr 16 22:56:03 2020 +0200
@@ -13,7 +13,7 @@
 
 # if the test timeout have been extended, explicitly extend the provided timer
 if [ "$HGTEST_TIMEOUT_DEFAULT" -lt "$HGTEST_TIMEOUT" ]; then
-    timer=$(( ($timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
+    timer=$(( ( 100 * $timer * $HGTEST_TIMEOUT) / $HGTEST_TIMEOUT_DEFAULT ))
 fi
 
 wait_on="$2"