Some of my tests fail randomly when the test case connects to redis with the following message:
Cannot assign requested address - connect(2) for [::1]:6379
my circle.ci is the following:
version: 2
jobs:
build:
docker:
- image: getgambacom/centos7:1.0
steps:
- run:
name: Starting Redis server
command: |
sed -e 's/^bind 127\.0\.0\.1$/bind 127.0.0.1 ::1/' < /etc/redis.conf > /tmp/redis.conf && mv /tmp/redis.conf /etc/redis.conf
redis-server --daemonize yes
- checkout
- run:
name: Run tests
command: bin/test-runner
The error is not always occurred. Re-running the tests succeed in many cases.
Does anyone know how to fix this issue?