1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 17:40:55 +00:00

fix the httplib test case timeout

This commit is contained in:
astaxie 2015-09-04 23:03:10 +08:00
parent f9fe89fff0
commit 34aa9002bb

View File

@ -19,6 +19,7 @@ import (
"os" "os"
"strings" "strings"
"testing" "testing"
"time"
) )
func TestResponse(t *testing.T) { func TestResponse(t *testing.T) {
@ -153,6 +154,7 @@ func TestWithSetting(t *testing.T) {
setting.EnableCookie = true setting.EnableCookie = true
setting.UserAgent = v setting.UserAgent = v
setting.Transport = nil setting.Transport = nil
setting.ReadWriteTimeout = 5 * time.Second
SetDefaultSetting(setting) SetDefaultSetting(setting)
str, err := Get("http://httpbin.org/get").String() str, err := Get("http://httpbin.org/get").String()