tests: eliminate shutdown race and sleeps in test-serve stable
authorMatt Mackall <mpm@selenic.com>
Wed, 28 Mar 2012 10:29:39 -0500
branchstable
changeset 16297 1791d7662d32
parent 16296 4343d5226149
child 16298 0eefd118f27e
tests: eliminate shutdown race and sleeps in test-serve
tests/test-serve.t
--- 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