From 18849c085a2226635abb4e820bd13f4a64555dbb Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Mon, 10 Apr 2017 08:14:51 -0700 Subject: [PATCH] increase CURL_TIMEOUT and CURL_CONNECT_TIMEOUT defaults. fixes #2668 --- plugins/build-env/pre-build-buildpack | 4 ++-- tests/unit/20_build-env.bats | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/build-env/pre-build-buildpack b/plugins/build-env/pre-build-buildpack index 537cececf..57d32917d 100755 --- a/plugins/build-env/pre-build-buildpack +++ b/plugins/build-env/pre-build-buildpack @@ -9,8 +9,8 @@ build_env_pre_build_buildpack() { local APP="$1"; local IMAGE=$(get_app_image_name "$APP"); local BUILD_ENV="" verify_app_name "$APP" - [[ -z $(config_get --global CURL_CONNECT_TIMEOUT) ]] && config_set --global CURL_CONNECT_TIMEOUT=5 - [[ -z $(config_get --global CURL_TIMEOUT) ]] && config_set --global CURL_TIMEOUT=30 + [[ -z $(config_get --global CURL_CONNECT_TIMEOUT) ]] && config_set --global CURL_CONNECT_TIMEOUT=90 + [[ -z $(config_get --global CURL_TIMEOUT) ]] && config_set --global CURL_TIMEOUT=60 if [[ -n $(config_export global) ]]; then local BUILD_ENV+=$'\n' diff --git a/tests/unit/20_build-env.bats b/tests/unit/20_build-env.bats index c28413d1a..dc7affbe8 100644 --- a/tests/unit/20_build-env.bats +++ b/tests/unit/20_build-env.bats @@ -35,12 +35,12 @@ teardown() { assert_success deploy_app - run /bin/bash -c "dokku config:get --global CURL_CONNECT_TIMEOUT | grep 5" + run /bin/bash -c "dokku config:get --global CURL_CONNECT_TIMEOUT | grep 90" echo "output: "$output echo "status: "$status assert_success - run /bin/bash -c "dokku config:get --global CURL_TIMEOUT | grep 30" + run /bin/bash -c "dokku config:get --global CURL_TIMEOUT | grep 60" echo "output: "$output echo "status: "$status assert_success