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

Add tests for federated service watcher #13329

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Add tests for federated service watcher #13329

merged 5 commits into from
Nov 19, 2024

Conversation

adleong
Copy link
Member

@adleong adleong commented Nov 15, 2024

Adds tests for the federated service watcher that exercise having remote and local clusters join and leave a federated service and ensuring that the correct proxy API updates are emitted.

@adleong adleong requested a review from a team as a code owner November 15, 2024 01:52
Signed-off-by: Alex Leong <[email protected]>
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

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

I think you missed adding the locks in the deleteService function.
Also, given most of the lock acquiring is for readers, would it make sense to use a RWMutex instead?

controller/api/destination/watcher/test_util.go Outdated Show resolved Hide resolved
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

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

LGTM modulo one more thing 👍

controller/api/destination/federated_service_watcher.go Outdated Show resolved Hide resolved
Signed-off-by: Alex Leong <[email protected]>
@adleong adleong merged commit 752d1c9 into main Nov 19, 2024
39 checks passed
@adleong adleong deleted the alex/federated-tests branch November 19, 2024 18:08
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.

2 participants