Patchwork D11779: tests: ensure a status will have non ambiguous mtime in some race test

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2021, 11:11 a.m.
Message ID <differential-rev-PHID-DREV-yrkshtufrufwuoxbz5ax-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50105/
State New
Headers show

Comments

phabricator - Nov. 24, 2021, 11:11 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  For the test to work, we need some mtime to be recorded.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11779

AFFECTED FILES
  tests/test-dirstate-race.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-dirstate-race.t b/tests/test-dirstate-race.t
--- a/tests/test-dirstate-race.t
+++ b/tests/test-dirstate-race.t
@@ -89,6 +89,7 @@ 
   > rm b && rm -r dir1 && rm d && mkdir d && rm e && mkdir e
   > EOF
 
+  $ sleep 1 # ensure non-ambiguous mtime
   $ hg status --config extensions.dirstaterace=$TESTTMP/dirstaterace.py
   M d
   M e