fix: lint warning

This commit is contained in:
lilong.129
2024-11-23 15:13:56 +08:00
parent ef37d88e0b
commit 9293c05a66
7 changed files with 13 additions and 7 deletions

View File

@@ -1 +1 @@
v5.0.0+2411231506
v5.0.0+2411231513

View File

@@ -1047,5 +1047,6 @@ func (ad *adbDriver) RecordScreen(folderPath string, duration time.Duration) (vi
return filepath.Abs(fileName)
}
func (ad *adbDriver) TearDown() {
func (ad *adbDriver) TearDown() error {
return nil
}

View File

@@ -338,5 +338,6 @@ func (hd *hdcDriver) RecordScreen(folderPath string, duration time.Duration) (vi
return "", nil
}
func (hd *hdcDriver) TearDown() {
func (hd *hdcDriver) TearDown() error {
return nil
}

View File

@@ -654,5 +654,5 @@ type IWebDriver interface {
GetDriverResults() []*DriverResult
RecordScreen(folderPath string, duration time.Duration) (videoPath string, err error)
TearDown()
TearDown() error
}

View File

@@ -356,6 +356,9 @@ func (dev *IOSDevice) Init() error {
dev.d.UserspaceTUNPort = info.UserspaceTUNPort
dev.d.UserspaceTUN = info.UserspaceTUN
rsdService, err := ios.NewWithAddrPortDevice(info.Address, info.RsdPort, dev.d)
if err != nil {
return err
}
defer rsdService.Close()
rsdProvider, err := rsdService.Handshake()
if err != nil {

View File

@@ -997,9 +997,10 @@ func (wd *wdaDriver) GetDriverResults() []*DriverResult {
return wd.Driver.driverResults
}
func (wd *wdaDriver) TearDown() {
func (wd *wdaDriver) TearDown() error {
wd.mjpegClient.CloseIdleConnections()
wd.client.CloseIdleConnections()
return nil
}
type rawResponse []byte

View File

@@ -537,9 +537,9 @@ func (s *stubIOSDriver) LogoutNoneUI(packageName string) error {
return nil
}
func (s *stubIOSDriver) TearDown() {
func (s *stubIOSDriver) TearDown() error {
s.Driver.client.CloseIdleConnections()
return
return nil
}
func (s *stubIOSDriver) getLoginAppInfo(packageName string) (info AppLoginInfo, err error) {