change wait calls for check calls in tests#11680
change wait calls for check calls in tests#11680knative-prow-robot merged 5 commits intoknative:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #11680 +/- ##
==========================================
- Coverage 87.85% 87.78% -0.08%
==========================================
Files 196 196
Lines 9373 9430 +57
==========================================
+ Hits 8235 8278 +43
- Misses 884 893 +9
- Partials 254 259 +5
Continue to review full report at Codecov.
|
9cf4a5b to
16b1b7a
Compare
|
/retest |
|
@markusthoemmes thanks for the remainder, I had forgotten about the route state check |
67b9d78 to
8ab62d5
Compare
|
/assign @dprotaso |
I'm not quite parsing that response 🤔. My question was whether this impacts the discussion in the issue I shared (I think it does?). |
|
@markusthoemmes well I didn't change every place where a |
|
I still see a few more waits after we check/wait for our resources to be ie. here's a raw dump - not all apply $ rg WaitForEndpointState
test/conformance/runtime/util.go
58: resp, err := pkgTest.WaitForEndpointState(
test/conformance/runtime/readiness_probe_test.go
114: if _, err = pkgtest.WaitForEndpointState(
test/e2e/scale.go
186: _, err = pkgTest.WaitForEndpointState(
195: t.Error("WaitForEndpointState(expected text) =", err)
196: return fmt.Errorf("WaitForEndpointState(expected text) failed: %w", err)
test/conformance/api/v1/util.go
131: _, err := pkgTest.WaitForEndpointState(
test/conformance/api/v1/route_test.go
43: _, err := pkgtest.WaitForEndpointState(
test/e2e/autoscale.go
237: if _, err := pkgTest.WaitForEndpointState(
test/e2e/logging_test.go
108: // A request was sent to / in WaitForEndpointState.
test/e2e/autoscale_hpa_test.go
94: if _, err := pkgTest.WaitForEndpointState(
test/e2e/tagheader/tag_header_based_routing_test.go
118: if _, err := pkgTest.WaitForEndpointState(
test/performance/benchmarks/scale-from-zero/continuous/main.go
198: _, err := pkgTest.WaitForEndpointStateWithTimeout(
test/ha/ha.go
66: if _, err := pkgTest.WaitForEndpointState(
test/upgrade/upgrade.go
53: if _, err := pkgTest.WaitForEndpointState(
$ rg WaitForRouteState
test/e2e/subroutes_test.go
160: if err = v1test.WaitForRouteState(clients.ServingClient, resources.Route.Name, func(r *v1.Route) (bool, error) {
185: if err := v1test.WaitForRouteState(clients.ServingClient, resources.Route.Name, func(r *v1.Route) (bool, error) {
271: if err = v1test.WaitForRouteState(clients.ServingClient, resources.Route.Name, func(r *v1.Route) (bool, error) {
303: if err = v1test.WaitForRouteState(clients.ServingClient, resources.Route.Name, func(r *v1.Route) (b bool, e error) {
347: if err = v1test.WaitForRouteState(clients.ServingClient, resources.Route.Name, v1test.IsRouteReady, "Route is ready"); err != nil {
test/e2e/destroypod_test.go
72: if err := v1test.WaitForRouteState(clients.ServingClient, names.Route, v1test.IsRouteReady, "RouteIsReady"); err != nil {
test/conformance/api/v1/generatename_test.go
191: if err := v1test.WaitForRouteState(clients.ServingClient, names.Route, v1test.IsRouteReady, "RouteIsReady"); err != nil {
test/conformance/api/v1/route_test.go
36: if err := v1test.WaitForRouteState(clients.ServingClient, names.Route, v1test.IsRouteReady, "RouteIsReady"); err != nil {
test/e2e/route_service_test.go
161: if err = v1test.WaitForRouteState(clients.ServingClient, serviceresourcenames.Route(svc), hasPrivateRoute, "RouteIsClusterLocal"); err != nil {
test/e2e/autotls/auto_tls_test.go
74: if err = v1test.WaitForRouteState(clients.ServingClient, names.Route, routeTLSDisabled, "RouteTLSDisabled"); err != nil {
78: if err = v1test.WaitForRouteState(clients.ServingClient, names.Route, routeURLHTTP, "RouteURLIsHTTP"); err != nil {
136: if err = v1test.WaitForRouteState(clients.ServingClient, names.Route, routeTrafficHTTPS, "RouteTrafficIsHTTPS"); err != nil {
test/v1/route.go
69:// WaitForRouteState polls the status of the Route called name from client every
73:func WaitForRouteState(client *test.ServingClients, name string, inState func(r *v1.Route) (bool, error), desc string) error {
74: span := logging.GetEmitableSpan(context.Background(), fmt.Sprintf("WaitForRouteState/%s/%s", name, desc))
97:// This is the non-polling variety of WaitForRouteState |
8ab62d5 to
14f917b
Compare
14f917b to
0c71c53
Compare
|
/retest |
0c71c53 to
bb1c75b
Compare
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
bb1c75b to
231f058
Compare
dprotaso
left a comment
There was a problem hiding this comment.
Looks like there's a new test file added with the rebase test/e2e/emptydir_test.go that uses WaitFor when it can be a Check
I still see Waits in the following files - any reason why those can't be switch over?
test/conformance/api/v1beta1/domain_mapping_test.go
test/conformance/api/v1/util.go
test/conformance/runtime/readiness_probe_test.go
test/e2e/autoscale.go
| } | ||
|
|
||
| _, err = pkgtest.WaitForEndpointState( | ||
| _, err = pkgtest.CheckEndpointState( |
There was a problem hiding this comment.
Can you update the comments in line 108 in this file?
| latencies.Add("time-to-ready", start) | ||
|
|
||
| _, err = pkgTest.WaitForEndpointState( | ||
| _, err = pkgTest.CheckEndpointState( |
There was a problem hiding this comment.
Can you update the error strings in this file - lines 196 and 197 to Match this new method call
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, shinigambit The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The |
|
Interesting we should probably add that to the |
Fixes #1178
Proposed Changes
knative/pkgto useCheckEndpointState