Skip to content

Commit

Permalink
Bug 1921720: fix sig-cli flakes
Browse files Browse the repository at this point in the history
This fixes two most frequently failing problems in our CI:
1. oc observe can spit 'Nothing to sync' if it doesn't find
anything and that is equally valid as 'Sync ended'
2. oc adm new-project frequently fails on timeout when
waiting for project deletion, so I'm bumping this to 2m.
  • Loading branch information
soltysh authored and openshift-cherrypick-robot committed Feb 22, 2021
1 parent 98a759f commit 73e8420
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions test/extended/cli/admin.go
Expand Up @@ -19,8 +19,9 @@ import (
)

var (
cliInterval = 5 * time.Second
cliTimeout = 1 * time.Minute
cliInterval = 5 * time.Second
cliTimeout = 1 * time.Minute
extendedCliTimeout = 2 * time.Minute
)

var _ = g.Describe("[sig-cli] oc adm", func() {
Expand Down Expand Up @@ -398,7 +399,7 @@ var _ = g.Describe("[sig-cli] oc adm", func() {
o.Expect(oc.Run("adm", "policy", "add-role-to-user").Args("--rolebinding-name=admin", "admin", "adduser", "-n", "ui-test-project").Execute()).To(o.Succeed())

// Make sure project can be listed by oc (after auth cache syncs)
err := wait.Poll(cliInterval, cliTimeout, func() (bool, error) {
err := wait.Poll(cliInterval, extendedCliTimeout, func() (bool, error) {
err := ocns.Run("get").Args("project/ui-test-project").Execute()
return err == nil, nil
})
Expand Down
2 changes: 1 addition & 1 deletion test/extended/cli/observe.go
Expand Up @@ -22,7 +22,7 @@ var _ = g.Describe("[sig-cli] oc observe", func() {

out, err = oc.Run("observe").Args("serviceaccounts", "--once").Output()
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(out).To(o.ContainSubstring("Sync ended"))
o.Expect(out).To(o.Or(o.ContainSubstring("Sync ended"), o.ContainSubstring("Nothing to sync")))

out, err = oc.Run("observe").Args("daemonsets", "--once").Output()
o.Expect(err).NotTo(o.HaveOccurred())
Expand Down
2 changes: 1 addition & 1 deletion test/extended/cli/rsh.go
Expand Up @@ -18,7 +18,7 @@ var _ = g.Describe("[sig-cli] oc rsh", func() {
podsLabel = exutil.ParseLabelsOrDie("name=hello-centos")
)

g.Describe("rsh specific flags", func() {
g.Describe("specific flags", func() {
g.It("should work well when access to a remote shell", func() {
namespace := oc.Namespace()
g.By("Creating pods with multi containers")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 73e8420

Please sign in to comment.