Mercurial > hg
changeset 49656:c6f0bcb7bc57 stable
test: adjust test-push-race.t timeout's to overall test timeout
The generic `tests/testlib/wait-on-file` mechanism scale its timeout with the
value of `HGTEST_TIMEOUT`, the `delaypush.py` in `test-push-race.t` is not doing
this, and we have been seeing more and more timeout from loaded CI worker
lately.
Adding this timeout scaling should help with that.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 24 Nov 2022 10:34:34 +0100 |
parents | c217d94cdd9d |
children | f56873a7284c ecfc84b956a8 |
files | tests/test-push-race.t |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-push-race.t Wed Nov 23 14:42:11 2022 +0100 +++ b/tests/test-push-race.t Thu Nov 24 10:34:34 2022 +0100 @@ -48,6 +48,14 @@ > if watchpath is not None: > ui.status(b'waiting on: %s\n' % watchpath) > limit = 100 + > test_default_timeout = os.environ.get('HGTEST_TIMEOUT_DEFAULT') + > test_timeout = os.environ.get('HGTEST_TIMEOUT') + > if ( + > test_default_timeout is not None + > and test_timeout is not None + > and test_default_timeout < test_timeout + > ): + > limit = int(limit * (test_timeout / test_default_timeout)) > while 0 < limit and not os.path.exists(watchpath): > limit -= 1 > time.sleep(0.1)