changeset 48374:a4a5d123fb03

tests: make sure no ambiguities remains after the commit This will help to stabilize part of the test that are not relevant for what is actually tested. Differential Revision: https://phab.mercurial-scm.org/D11778
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 18 Nov 2021 00:08:57 +0100
parents f3f41e23c1fa
children 4c61c7f75de6
files tests/test-dirstate-race2.t
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-dirstate-race2.t	Thu Nov 04 17:49:25 2021 +0100
+++ b/tests/test-dirstate-race2.t	Thu Nov 18 00:08:57 2021 +0100
@@ -19,6 +19,12 @@
   $ hg commit -qAm _
   $ echo aa > a
   $ hg commit -m _
+# this sleep is there to ensure current time has -at-least- one second away
+# from the current time. It ensure the mtime is not ambiguous. If the test
+# "sleep" longer this will be fine.
+# It is not used to synchronise parallele operation so it is "fine" to use it.
+  $ sleep 1
+  $ hg status
 
   $ hg debugdirstate --no-dates
   n 644          3 (set  |unset)               a (re)