tests/test-hup.t
changeset 20896 9fae01831dea
parent 16364 f64b25f147d7
child 22046 7a9cbb315d84
--- a/tests/test-hup.t	Mon Mar 31 16:03:34 2014 -0700
+++ b/tests/test-hup.t	Wed Apr 02 00:01:21 2014 -0700
@@ -11,7 +11,16 @@
   $ (
   > echo lock
   > echo addchangegroup
-  > while [ ! -s .hg/store/journal ]; do sleep 0; done
+  > start=`date +%s`
+  > # 10 second seems much enough to let the server catch up
+  > deadline=`expr $start + 10`
+  > while [ ! -s .hg/store/journal ]; do
+  >     sleep 0;
+  >     if [ `date +%s` -gt $deadline ]; then
+  >         echo "transaction did not start after 10 seconds" >&2;
+  >         exit 1;
+  >     fi
+  > done
   > kill -HUP $P
   > ) > p