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: fixed race condition with endpoint deletion #695

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

manusa
Copy link
Contributor

@manusa manusa commented Oct 24, 2023

Fix #667
Relates to #689

client.endpoints().inNamespace(defaultNamespace).withName(serviceName).delete()

doesn't wait for the operation to complete in the cluster. It limits to send the HTTP request to the Kube API and return.

We either need to wait for a condition where this endpoint is null.
Or use the convenience .withTimeout DSL method so that Kubernetes client blocks the thread for us in a best effort attempt to wait until the referenced Kubernetes object no longer exists.

Copy link
Collaborator

@aureamunoz aureamunoz left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you very much @manusa !

@manusa
Copy link
Contributor Author

manusa commented Oct 24, 2023

fixing format

client.endpoints().inNamespace(defaultNamespace).withName(serviceName).delete()

doesn't wait for the operation to complete in the cluster.

We either need to wait for a condition where these endpoint
is null.
Or use the convenience .withTimeout DSL method so that
Kubernetes client blocks the thread for us in a best effort
attempt to wait until the referenced Kubernetes object no longer
exists.
@manusa manusa force-pushed the test/fetch-instances branch from 5e59ce3 to 483789f Compare October 24, 2023 10:54
@aureamunoz aureamunoz merged commit aef8c69 into smallrye:main Oct 24, 2023
8 checks passed
@manusa manusa deleted the test/fetch-instances branch October 24, 2023 12:30
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.

Rework Kubernetes Service Discovery flaky tests
2 participants