Skip to content

Commit

Permalink
fix(test): ci test failed (#1917)
Browse files Browse the repository at this point in the history
* fix(test): test e2e installer connect refused (#1906)

* fix(test): ssh poll cant support timeout with err (#1911)
  • Loading branch information
wl-chen committed May 9, 2022
1 parent 7bd53d5 commit 09b8678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/util/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ func (s *SSH) newClient() (*ssh.Client, func(), error) {
}
client, err := s.dialer.Dial("tcp", s.addr(), config)
if err != nil {
err = wait.Poll(5*time.Second, time.Duration(s.Retry)*5*time.Second, func() (bool, error) {
wait.Poll(5*time.Second, time.Duration(s.Retry)*5*time.Second, func() (bool, error) {
if client, err = s.dialer.Dial("tcp", s.addr(), config); err != nil {
return false, err
return false, nil
}
err = nil
return true, nil
})
}
Expand Down
2 changes: 1 addition & 1 deletion test/util/cloudprovider/tencent/tencent.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (p *provider) CreateInstances(count int64) ([]cloudprovider.Instance, error
Port: int(ins.Port),
Password: ins.Password,
DialTimeOut: 30 * time.Second,
Retry: 5,
Retry: 50,
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 09b8678

Please sign in to comment.