|
@@ -12,12 +12,12 @@ func TestTransporterTimeout(t *testing.T) {
|
|
|
|
|
|
|
|
ts := newTransporter("http", conf, time.Second)
|
|
ts := newTransporter("http", conf, time.Second)
|
|
|
|
|
|
|
|
- _, err := ts.Get("http://127.0.0.2:7000")
|
|
|
|
|
|
|
+ _, err := ts.Get("http://google.com:9999") // it doesn't exisit
|
|
|
if err == nil || err.Error() != "Wait Response Timeout: 1s" {
|
|
if err == nil || err.Error() != "Wait Response Timeout: 1s" {
|
|
|
- t.Fatal("timeout error: ", err.Error())
|
|
|
|
|
|
|
+ t.Fatal("timeout error: ", err.Error( ))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- _, err = ts.Post("http://127.0.0.2:7000", nil)
|
|
|
|
|
|
|
+ _, err = ts.Post("http://google.com:9999", nil) // it doesn't exisit
|
|
|
if err == nil || err.Error() != "Wait Response Timeout: 1s" {
|
|
if err == nil || err.Error() != "Wait Response Timeout: 1s" {
|
|
|
t.Fatal("timeout error: ", err.Error())
|
|
t.Fatal("timeout error: ", err.Error())
|
|
|
}
|
|
}
|