Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
integration helpers: Fix concurrent calls to start_docker().
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Luzzardi <[email protected]>
  • Loading branch information
aluzzardi committed Mar 7, 2015
1 parent d80ace5 commit fef5d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ function start_docker() {
local i

# Start the engines.
for ((i=current; i < instances; i++)); do
for ((i=current; i < (current + instances); i++)); do
local port=$(($BASE_PORT + $i))
HOSTS[$i]=127.0.0.1:$port
DOCKER_CONTAINERS[$i]=$(docker run -d --name node-$i -h node-$i --privileged -p 127.0.0.1:$port:$port -it ${DOCKER_IMAGE}:${DOCKER_VERSION} docker -d -H 0.0.0.0:$port "$@")
done

# Wait for the engines to be reachable.
for ((i=current; i < instances; i++)); do
for ((i=current; i < (current + instances); i++)); do
wait_until_reachable ${HOSTS[$i]}
done
}
Expand Down

0 comments on commit fef5d18

Please sign in to comment.