| |
---|
| | die 'Fetching from unconnectable registry should fail immediately.' |
---|
| | fi |
---|
| | |
---|
| | log ' Testing non-responding registry' |
---|
| | cat | nc --listen $PORT >/dev/null & |
---|
| | cat | nc -l $PORT >/dev/null & |
---|
| | PID=$! |
---|
| | if timeout 10s $DUB fetch dub --skip-registry=all --registry=http://localhost:$PORT; then |
---|
| | die 'Fetching from non-responding registry should fail.' |
---|
| | elif [ $? -eq 124 ]; then |
---|
| |
---|
| | for i in $(seq 0 $((${#res} - 1))); do |
---|
| | echo -n "${res:$i:1}" |
---|
| | sleep 1 |
---|
| | done |
---|
| | } | nc --listen $PORT >/dev/null & |
---|
| | } | nc -l $PORT >/dev/null & |
---|
| | PID=$! |
---|
| | if timeout 10s time $DUB fetch dub --skip-registry=all --registry=http://localhost:$PORT; then |
---|
| | die 'Fetching from too slow registry should fail.' |
---|
| | elif [ $? -eq 124 ]; then |
---|
| | |