Inconsistency with wait.PollImmediate and WaitForEndpointState
/area test-and-release /kind bug
Expected Behavior
wait.PollImmediate should keep on polling if I pass response checkers through WaitForEndpointState https://github.com/knative/pkg/blob/main/test/request.go#L78 until the state is reached or timeout happens.
Actual Behavior
Since the response checkers for example: https://github.com/knative/pkg/blob/main/test/spoof/response_checks.go#L33 returns true or error, it makes wait.PollImmediate stop polling, that is - only the first endpoint state is checked.
Additional Info
Apologies if I am reading the code wrong, but if this really is an inconsistency, I think the return should be changed to false, nil (in the statuscode check function as well), this makes sense according to me because anyway WaitForEndpointState is the only function which is propogating the response checkers to the Poll method, for CheckEndpointState its defaulted to true, nil and it makes sense because this method's scope is to just check once. If this reasoning makes sense, I can create a PR.
cc @julz
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
/remove-lifecycle stale
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
/remove-lifecycle stale
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
This issue or pull request is stale because it has been open for 90 days with no activity.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close
/lifecycle stale
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
/lifecycle frozen