mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
change: remove ios health check
This commit is contained in:
@@ -10,9 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
DefaultWaitTimeout = 60 * time.Second
|
DefaultWaitTimeout = 60 * time.Second
|
||||||
DefaultWaitInterval = 400 * time.Millisecond
|
DefaultWaitInterval = 400 * time.Millisecond
|
||||||
DefaultKeepAliveInterval = 30 * time.Second
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlertAction string
|
type AlertAction string
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
giDevice "github.com/electricbubble/gidevice"
|
giDevice "github.com/electricbubble/gidevice"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -220,20 +219,6 @@ func (dev *IOSDevice) NewUSBDriver(capabilities Capabilities) (driver WebDriver,
|
|||||||
}
|
}
|
||||||
_, err = wd.NewSession(capabilities)
|
_, err = wd.NewSession(capabilities)
|
||||||
|
|
||||||
go func() {
|
|
||||||
if DefaultKeepAliveInterval <= 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ticker := time.NewTicker(DefaultKeepAliveInterval)
|
|
||||||
for {
|
|
||||||
<-ticker.C
|
|
||||||
if healthy, err := wd.IsHealthy(); err != nil || !healthy {
|
|
||||||
ticker.Stop()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
return wd, err
|
return wd, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user