diff --git a/test/e2e/azure/cli.go b/test/e2e/azure/cli.go index 73466ffeab..fe85a9e61b 100644 --- a/test/e2e/azure/cli.go +++ b/test/e2e/azure/cli.go @@ -152,7 +152,8 @@ func (a *Account) CreateGroupWithRetry(name, location string, sleep, timeout tim select { case <-ctx.Done(): return - case ch <- a.CreateGroup(name, location): + default: + ch <- a.CreateGroup(name, location) time.Sleep(sleep) } } @@ -200,7 +201,8 @@ func (a *Account) ShowGroupWithRetry(name string, sleep, timeout time.Duration) select { case <-ctx.Done(): return - case ch <- a.ShowGroup(name): + default: + ch <- a.ShowGroup(name) time.Sleep(sleep) } } @@ -387,7 +389,8 @@ func (a *Account) GetRGRouteTable(timeout time.Duration) (network.RouteTable, er select { case <-ctx.Done(): return - case ch <- a.ListRGRouteTable(): + default: + ch <- a.ListRGRouteTable() time.Sleep(5 * time.Second) } } diff --git a/test/e2e/remote/ssh.go b/test/e2e/remote/ssh.go index e06670aaf5..e9d82761a9 100644 --- a/test/e2e/remote/ssh.go +++ b/test/e2e/remote/ssh.go @@ -119,7 +119,8 @@ func NewConnectionWithRetry(host, port, user, keyPath string, sleep, timeout tim select { case <-ctx.Done(): return - case ch <- NewConnectionAsync(host, port, user, keyPath): + default: + ch <- NewConnectionAsync(host, port, user, keyPath) time.Sleep(sleep) } } @@ -241,7 +242,8 @@ func (c *Connection) CopyToRemoteWithRetry(hostname, path string, sleep, timeout select { case <-ctx.Done(): return - case ch <- c.CopyToRemote(hostname, path): + default: + ch <- c.CopyToRemote(hostname, path) time.Sleep(sleep) } } @@ -285,7 +287,8 @@ func (c *Connection) ExecuteRemoteWithRetry(node, command string, printStdout bo select { case <-ctx.Done(): return - case ch <- c.ExecuteRemote(node, command, printStdout): + default: + ch <- c.ExecuteRemote(node, command, printStdout) time.Sleep(sleep) } }