changeset 50177:964a913343a2 stable

test-dirstate: use more robust method to trigger a data-file append The previous method was fragile and somewhat flaky on fast machines.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 15:17:48 +0100
parents bf27727e6c78
children baa4e2c93642
files tests/test-dirstate.t
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-dirstate.t	Wed Feb 22 18:10:26 2023 +0100
+++ b/tests/test-dirstate.t	Mon Jan 09 15:17:48 2023 +0100
@@ -148,7 +148,7 @@
   $ hg init append-mostly
   $ cd append-mostly
   $ mkdir dir dir2
-  $ touch dir/a dir/b dir/c dir/d dir/e dir2/f
+  $ touch -t 200001010000 dir/a dir/b dir/c dir/d dir/e dir2/f dir dir2
   $ hg commit -Aqm initial
   $ hg st
   $ dirstate_data_files | wc -l
@@ -163,12 +163,11 @@
   $ dirstate_uuid_has_not_changed
   not testing because using Python implementation (no-rust no-rhg !)
 
-Trigger an append with a small change
+Trigger an append with a small change to directory mtime
 
   $ current_data_size=$(find_dirstate_data_size)
-  $ rm dir2/f
+  $ touch -t 201001010000 dir2
   $ hg st
-  ! dir2/f
   $ dirstate_data_files | wc -l
    *1 (re)
   $ dirstate_uuid_has_not_changed
@@ -187,7 +186,6 @@
 Trigger a rust/rhg run which updates the unused bytes value
   $ hg st
   A file
-  ! dir2/f
   $ dirstate_data_files | wc -l
    *1 (re)
   $ dirstate_uuid_has_not_changed