mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 17:50:58 +00:00
fix the httplib test case timeout
This commit is contained in:
parent
f9fe89fff0
commit
34aa9002bb
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user