changeset 43851:fac25de8cbec stable

remotefilelog: remove most sleep in tests Now that we removed most of the races, we can remove the infamous sleeps. Differential Revision: https://phab.mercurial-scm.org/D7587
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 09 Dec 2019 10:09:40 +0100
parents 88ab1295db4c
children b6c7475595db
files tests/test-remotefilelog-bgprefetch.t tests/test-remotefilelog-gcrepack.t tests/test-remotefilelog-repack-fast.t tests/test-remotefilelog-repack.t
diffstat 4 files changed, 0 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-remotefilelog-bgprefetch.t	Mon Dec 09 09:57:34 2019 +0100
+++ b/tests/test-remotefilelog-bgprefetch.t	Mon Dec 09 10:09:40 2019 +0100
@@ -79,7 +79,6 @@
   new changesets 6b4b6f66ef8c
   (run 'hg update' to get a working copy)
   prefetching file contents
-  $ sleep 0.5
   $ hg debugwaitonprefetch >/dev/null 2>%1
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0
@@ -108,11 +107,8 @@
   new changesets 6b4b6f66ef8c
   (run 'hg update' to get a working copy)
   prefetching file contents
-  $ sleep 0.5
   $ hg debugwaitonprefetch >/dev/null 2>%1
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 0.5
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx
   $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack
@@ -144,11 +140,8 @@
   $ hg up -r 0
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob)
-  $ sleep 1
   $ hg debugwaitonprefetch >/dev/null 2>%1
-  $ sleep 1
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 1
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
@@ -196,11 +189,8 @@
   $ hg commit -qAm b
   * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob)
   $ hg bookmark temporary
-  $ sleep 1
   $ hg debugwaitonprefetch >/dev/null 2>%1
-  $ sleep 1
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 1
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
@@ -246,11 +236,8 @@
   rebasing 3:58147a5b5242 "b" (temporary tip)
   saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg
   3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
-  $ sleep 1
   $ hg debugwaitonprefetch >/dev/null 2>%1
-  $ sleep 1
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 1
 
 # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore
 # could only be downloaded by the background prefetch
@@ -290,9 +277,7 @@
   (running background incremental repack)
   * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
 
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 0.5
 
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
@@ -334,9 +319,7 @@
   got lock after * seconds (glob) (?)
   (running background incremental repack)
   * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
-  $ sleep 0.5
 
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
--- a/tests/test-remotefilelog-gcrepack.t	Mon Dec 09 09:57:34 2019 +0100
+++ b/tests/test-remotefilelog-gcrepack.t	Mon Dec 09 10:09:40 2019 +0100
@@ -40,7 +40,6 @@
   $ hg prefetch
   2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
   $ hg repack
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
 
   $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
@@ -73,7 +72,6 @@
   > EOF
 
   $ hg repack
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
 
   $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
@@ -101,7 +99,6 @@
   $ hg prefetch
   2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
   $ hg repack
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
 
   $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
@@ -135,7 +132,6 @@
   > EOF
 
   $ hg repack
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>%1
 
   $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
--- a/tests/test-remotefilelog-repack-fast.t	Mon Dec 09 09:57:34 2019 +0100
+++ b/tests/test-remotefilelog-repack-fast.t	Mon Dec 09 10:09:40 2019 +0100
@@ -143,7 +143,6 @@
 
   $ hg repack --background
   (running background repack)
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>&1
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
@@ -343,7 +342,6 @@
   searching for changes
   no changes found
   (running background incremental repack)
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>&1
   $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
   -r--r--r--     303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
--- a/tests/test-remotefilelog-repack.t	Mon Dec 09 09:57:34 2019 +0100
+++ b/tests/test-remotefilelog-repack.t	Mon Dec 09 10:09:40 2019 +0100
@@ -153,7 +153,6 @@
 
   $ hg repack --background
   (running background repack)
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>&1
   $ find $CACHEDIR -type f | sort
   $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
@@ -372,7 +371,6 @@
   searching for changes
   no changes found
   (running background incremental repack)
-  $ sleep 0.5
   $ hg debugwaitonrepack >/dev/null 2>&1
   $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
   -r--r--r--     303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack