summaryrefslogtreecommitdiffstats
path: root/test/test_mirror.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mirror.sh.in')
-rw-r--r--test/test_mirror.sh.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_mirror.sh.in b/test/test_mirror.sh.in
index 9713f89..fbc7ede 100644
--- a/test/test_mirror.sh.in
+++ b/test/test_mirror.sh.in
@@ -22,7 +22,10 @@
nerrors=0
SERVER_VERBOSITY="--verbosity=1"
-SERVER_PORT="--port=3000"
+# Choose random ephemeral port number
+RANDOM_PORT=$[ $RANDOM % 16384 + 49152 ]
+echo "Using port: $RANDOM_PORT"
+SERVER_PORT="--port=$RANDOM_PORT"
###############################################################################
@@ -83,12 +86,15 @@ echo "Launching Mirror Server"
SERVER_ARGS="$SERVER_PORT $SERVER_VERBOSITY"
./mirror_server $SERVER_ARGS &
-./mirror_vfd
+./mirror_vfd $SERVER_PORT
nerrors=$?
echo "Stopping Mirror Server"
./mirror_server_stop $SERVER_PORT
+# Wait for background server process to exit
+wait
+
###############################################################################
## Report and exit
###############################################################################