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

Commit

Permalink
change sleep from 20s to 30s
Browse files Browse the repository at this point in the history
  • Loading branch information
pviotti committed Mar 15, 2020
1 parent e051373 commit 11d92e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ start_single_instance() {
echo "Starting single instance"
docker rm -fv $(docker ps -q -f ancestor=antidotedb/antidote) 2> /dev/null
docker run -d --rm -it -p "8087:8087" antidotedb/antidote:latest > /dev/null
sleep 20
sleep 30
rm -rf d1; mkdir d1
node ./src/antidote-fs.js -m d1 -a "localhost:8087" > /dev/null &
sleep 5
Expand Down

2 comments on commit 11d92e9

@bieniusa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sleeps might not be the best solution - why not loop until the container is ready?
Example is here

@pviotti
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that'd be certainly better. It's just a bit tricky in bash, since it has to check not only that the port is open but also that the process is ready to accept connections. 🤔
Maybe adding a healthcheck in the Docker image would make this easier.

Please sign in to comment.