fix(e2e): Let the subscription and related resource reconcile (#1044)

sleep for 5 seconds after subscription create and update in e2e
This commit is contained in:
Navid Shaikh 2020-10-06 13:15:20 +05:30 committed by GitHub
parent adb3793b98
commit aa6c4ad22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,8 @@ limitations under the License.
package test package test
import ( import (
"time"
"gotest.tools/assert" "gotest.tools/assert"
"knative.dev/client/pkg/util" "knative.dev/client/pkg/util"
@ -28,6 +30,8 @@ func SubscriptionCreate(r *KnRunResultCollector, sname string, args ...string) {
out := r.KnTest().Kn().Run(cmd...) out := r.KnTest().Kn().Run(cmd...)
r.AssertNoError(out) r.AssertNoError(out)
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "created")) assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "created"))
// let the subscription and related resource reconcile
time.Sleep(time.Second * 5)
} }
func SubscriptionList(r *KnRunResultCollector, args ...string) string { func SubscriptionList(r *KnRunResultCollector, args ...string) string {
@ -58,4 +62,6 @@ func SubscriptionUpdate(r *KnRunResultCollector, sname string, args ...string) {
out := r.KnTest().Kn().Run(cmd...) out := r.KnTest().Kn().Run(cmd...)
r.AssertNoError(out) r.AssertNoError(out)
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "updated")) assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "updated"))
// let the subscription and related resource reconcile
time.Sleep(time.Second * 5)
} }