Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

test: go routine errata #4233

Merged
merged 1 commit into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/e2e/azure/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down
9 changes: 6 additions & 3 deletions test/e2e/remote/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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)
}
}
Expand Down