apisix-ingress-controller
apisix-ingress-controller copied to clipboard
test: Remove `time.Sleep` and replace with wait.poll
background
In the current project's e2e, a lot of time.sleep
is used. This will undoubtedly increase the overall time-consuming of CI.
https://pkg.go.dev/k8s.io/apimachinery/pkg/util/wait package provides tools for polling or listening for changes to a condition.
We can replace the current time.sleep
with wait
for a more elegant way of determining whether our desired state has been reached.
To do list:
- [ ] suite-annotations
- [ ] suite-ingress
- [x] suite-ingress-resource #1128
- [ ] suite-ingress-features
- [ ] suite-plugins
- [ ] suite-plugins-authentication
- [ ] suite-plugins-general
- [ ] suite-plugins-other
- [ ] suite-plugins-security
- [ ] suite-plugins-traffic
- [ ] suite-plugins-transformation
- [ ] suite-features