changeset 50078:983e2db18d67 stable

test: fix the flakyness in test-remotefilelog-local.t I now get about 80% of my `test-chg` CI run that fails on flakyness in this tests. It turns out this is only ambiguous status that end up doing file download. So… calling status early will do that potential download separately and the calls we scrutinize during that test will be just fine.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 16 Feb 2023 20:33:14 +0100
parents b5ecd0bcbcd7
children 4fc6b423fa97
files tests/test-remotefilelog-local.t
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-remotefilelog-local.t	Fri Feb 03 12:54:17 2023 +0100
+++ b/tests/test-remotefilelog-local.t	Thu Feb 16 20:33:14 2023 +0100
@@ -77,6 +77,11 @@
   n 644          2 * z (glob)
   $ echo xxxx > x
   $ echo yyyy > y
+# run status early to avoid a flaky second fetch during commit.
+  $ hg st
+  M x
+  M y
+  \d+ files fetched over \d+ fetches .* (re) (?)
   $ hg commit -m x
   created new head
   2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
@@ -104,6 +109,9 @@
   new changesets fed61014d323
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
+# run status early to avoid a flaky second fetch during commit
+  $ hg status
+  \d+ files fetched over \d+ fetches .* (re) (?)
   $ hg rebase -d tip
   rebasing 1:9abfe7bca547 "a"
   saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/9abfe7bca547-8b11e5ff-rebase.hg (glob)