Skip to content

Comments

🌱 Test cache reader waits for cache sync#3434

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:testcachesync
Jan 26, 2026
Merged

🌱 Test cache reader waits for cache sync#3434
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
alvaroaleman:testcachesync

Conversation

@alvaroaleman
Copy link
Member

We don't seem to have any test coverage of this at all, change that.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2026
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2026
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 25, 2026
g.Expect(err).ToNot(HaveOccurred())

services := &corev1.ServiceList{}
listCtx, listCtxcancel := context.WithTimeout(ctx, time.Second)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sync check internally works through polling (We've inherited that from upstream). I both want to keep the timeout high enough to be sure it polls a few times even if maybe in the future the poll interval changes but also not have the test actually run for poll interval duration, hence using synctest.

g.Expect(c.Start(ctx)).To(Succeed())
close(cacheDone)
}()
synctest.Wait() // Let the cache finish starting
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinating "cache has finished starting up" with the rest would require us to sleep without synctest, as Start is blocking

@alvaroaleman
Copy link
Member Author

/cherrypick release-0.23

@k8s-infra-cherrypick-robot

@alvaroaleman: once the present PR merges, I will cherry-pick it on top of release-0.23 in a new PR and assign it to you.

Details

In response to this:

/cherrypick release-0.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@alvaroaleman alvaroaleman force-pushed the testcachesync branch 2 times, most recently from d7c57dc to 72ef016 Compare January 25, 2026 21:14
We don't seem to have any test coverage of this at all, change that.
@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

Feel free to remove hold

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 26, 2026
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: f3d5bd97f14761a09a7f430e03418cb2bca122fd

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alvaroaleman
Copy link
Member Author

/hold

@alvaroaleman
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2026
@k8s-ci-robot k8s-ci-robot merged commit 3117b04 into kubernetes-sigs:main Jan 26, 2026
9 checks passed
@k8s-infra-cherrypick-robot

@alvaroaleman: new pull request created: #3438

Details

In response to this:

/cherrypick release-0.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants