mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 11:29:48 +08:00
change: remove ios health check
This commit is contained in:
@@ -10,9 +10,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
DefaultWaitTimeout = 60 * time.Second
|
||||
DefaultWaitInterval = 400 * time.Millisecond
|
||||
DefaultKeepAliveInterval = 30 * time.Second
|
||||
DefaultWaitTimeout = 60 * time.Second
|
||||
DefaultWaitInterval = 400 * time.Millisecond
|
||||
)
|
||||
|
||||
type AlertAction string
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
giDevice "github.com/electricbubble/gidevice"
|
||||
"github.com/pkg/errors"
|
||||
@@ -220,20 +219,6 @@ func (dev *IOSDevice) NewUSBDriver(capabilities Capabilities) (driver WebDriver,
|
||||
}
|
||||
_, 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user