Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add a cacheSyncingClient for testing that allows for custom FieldIndexers #145

Merged

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented Dec 30, 2022

Fixes #

Description

  • Adds a cacheSyncingClient that waits for WRITE operations to be propagated to the cache before proceeding
  • It is meant to mock a direct client while also giving a client-side cache for indexing fieldSelectors

How was this change tested?

make presubmit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathan-innis jonathan-innis requested a review from a team as a code owner December 30, 2022 19:02
@jonathan-innis jonathan-innis force-pushed the cache-syncing-client branch 5 times, most recently from 1d3fc97 to a541937 Compare December 30, 2022 19:07
@jonathan-innis jonathan-innis changed the title test: Add a cacheSyncingClient for testing that uses custom FieldIndexers test: Add a cacheSyncingClient for testing that allows for custom FieldIndexers Dec 30, 2022
@coveralls
Copy link

coveralls commented Dec 30, 2022

Pull Request Test Coverage Report for Build 3808688664

  • 33 of 148 (22.3%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.1%) to 76.038%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/utils/machine/machine.go 0 1 0.0%
pkg/test/environment.go 17 39 43.59%
pkg/test/cachesyncingclient.go 0 92 0.0%
Totals Coverage Status
Change from base Build 3798328068: -1.1%
Covered Lines: 5712
Relevant Lines: 7512

💛 - Coveralls

Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

nice, this is neat!

@jonathan-innis jonathan-innis merged commit 4c1d3b2 into kubernetes-sigs:main Dec 30, 2022
@jonathan-innis jonathan-innis deleted the cache-syncing-client branch December 30, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants