At this time of writing TravisCI says that if you want to run a Cassandra service you have to add a cassandra service according to https://docs.travis-ci.com/user/database-setup/#cassandra:
services:but if you try to initialize cassandra you might find out that cassandra is not yet ready or running depending on timing.
- cassandra
The solution is:
- a .travis.yml file (see https://github.com/davidemoro/pytest-play-docker/blob/master/.travis.yml) with the cassandra service and a "bash travis/setup_cassandra.sh" command in before_script section
- a travis/setup_cassandra.sh (see https://github.com/davidemoro/pytest-play-docker/blob/master/travis/setup_cassandra.sh) that waits for cassandra up and running (e.g., a sleep 30, a polling loop with max retries implemented in my travis/setup_cassandra.sh script or using docker service) before cqlsh initialization commands
No comments:
Post a Comment
Note: only a member of this blog may post a comment.