Commit c8f617c8 authored by eta's avatar eta
Browse files

Merge branch 'integration_fix' into 'main'

chutney/setup: Wait for port 9150 to open after launching arti

Closes #367

See merge request !370
parents 57a8fe5f 0634d12f
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -44,6 +44,20 @@ fi
	wait "$pid"
	echo "result=$?" >> tests/chutney/arti.run
) & disown

# Wait for arti to start listening (it does so "immediately", but we don't want to get there first)
# Really there should be a proper daemon startup protocol here, but arti doesn't have one yet.
for idx in $(seq 30); do
    if : >&/dev/null </dev/tcp/127.0.0.1/9150 ; then
	echo "Port 9150 seems open."
	break
    elif [ "$idx" == 30 ]; then
	echo "Waited 30 seconds without result; giving up on port 9150."
	exit 1
    else
	echo "waiting for port 9150..."
	sleep 1
    fi
done