changeset 16297:1791d7662d32 stable

tests: eliminate shutdown race and sleeps in test-serve
author Matt Mackall <mpm@selenic.com>
date Wed, 28 Mar 2012 10:29:39 -0500
parents 4343d5226149
children 0eefd118f27e
files tests/test-serve.t
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-serve.t	Wed Mar 28 10:11:12 2012 -0500
+++ b/tests/test-serve.t	Wed Mar 28 10:29:39 2012 -0500
@@ -9,13 +9,12 @@
   >    cat hg.pid >> "$DAEMON_PIDS"
   >    echo % errors
   >    cat errors.log
-  >    sleep 1
   >    if [ "$KILLQUIETLY" = "Y" ]; then
   >        kill `cat hg.pid` 2>/dev/null
   >    else
   >        kill `cat hg.pid`
   >    fi
-  >    sleep 1
+  >    while kill -0 `cat hg.pid` 2>/dev/null; do true; done
   > }
 
   $ hg init test