Skip to content
Browse files

Use Python instead of Perl.

  • Loading branch information...
1 parent 8231783 commit f3940cab781ceaaa494f3be2e60b098f198300a6 @glasser glasser committed Jan 2, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 admin/cli-test.sh
View
10 admin/cli-test.sh
@@ -125,19 +125,19 @@ sleep 2 # need to make sure these kills take effect
echo "... mongo message"
-# Use perl to listen on a port, so that Mongo fails to start up. (We used to use
-# nc here, but the way you specify listener ports to nc varies between
+# Use Python to listen on a port, so that Mongo fails to start up. (We used to
+# use nc here, but the way you specify listener ports to nc varies between
# platforms. Bleah.)
-perl -MIO::Socket::INET -e '$a = IO::Socket::INET->new(LocalPort=>('$PORT' + 2),LocalAddr=>"127.0.0.1",Proto=>"tcp",ReuseAddr=>1,Listen=>5) or die; sleep' &
-PERL_PID=$!
+python -c 'from socket import *; s = socket(); s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1); s.bind(("127.0.0.1", '$PORT'+2)); s.listen(1); s.accept()' &
+PYTHON_PID=$!
sleep 1
$METEOR -p $PORT > error.txt || true
grep 'port was closed' error.txt > /dev/null
-kill -9 $PERL_PID > /dev/null
+kill -9 $PYTHON_PID > /dev/null
echo "... settings"

0 comments on commit f3940ca

Please sign in to comment.
Something went wrong with that request. Please try again.