Bug report
The wait.Wait.Wait() implementations create the watch they are listen to in a goroutine that can execute later than the code that emits the event the watch was intended for.
Expected behavior
The watch is created upfront, then the wait for the event is executed in a goroutine while the main thread calls the backend that will emit the expected event.
Steps to reproduce the problem
I was able reproduce this by:
- adding 30 seconds sleep into
vi/client.go's WatchRevision method before the watch is created on the backend
- call
kn revision delete --wait <rev_name>
kn version
HEAD
Knative (serving/eventing) version
N/A
Bug report
The
wait.Wait.Wait()implementations create the watch they are listen to in a goroutine that can execute later than the code that emits the event the watch was intended for.Expected behavior
The watch is created upfront, then the wait for the event is executed in a goroutine while the main thread calls the backend that will emit the expected event.
Steps to reproduce the problem
I was able reproduce this by:
vi/client.go'sWatchRevisionmethod before the watch is created on the backendkn revision delete --wait <rev_name>kn version
HEAD
Knative (serving/eventing) version
N/A