Skip to content

Commit

Permalink
fix(e2e): Let the subscription and related resource reconcile
Browse files Browse the repository at this point in the history
 sleep for 5 seconds after subscription create and update in e2e
  • Loading branch information
navidshaikh committed Oct 6, 2020
1 parent adb3793 commit 986ebac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/test/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package test

import (
"gotest.tools/assert"
"time"

"knative.dev/client/pkg/util"
)
Expand All @@ -28,6 +29,8 @@ func SubscriptionCreate(r *KnRunResultCollector, sname string, args ...string) {
out := r.KnTest().Kn().Run(cmd...)
r.AssertNoError(out)
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 {
Expand Down Expand Up @@ -58,4 +61,6 @@ func SubscriptionUpdate(r *KnRunResultCollector, sname string, args ...string) {
out := r.KnTest().Kn().Run(cmd...)
r.AssertNoError(out)
assert.Check(r.T(), util.ContainsAllIgnoreCase(out.Stdout, "subscription", sname, "updated"))
// let the subscription and related resource reconcile
time.Sleep(time.Second * 5)
}

0 comments on commit 986ebac

Please sign in to comment.