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

[Inference API] Avoid potential flaky wire serialization test cases #108605

Conversation

timgrein
Copy link
Contributor

AFAIU there's some small likelihood for createTestInstance and mutateInstance to return two equal instances if you don't wrap createRandom calls with randomValueOtherThan, which would lead to a flaky test failure. I've adjusted this for all wire serialization test cases and also implemented mutateInstance where null was returned. Some of these classes were records, so we strictly don't need to test this, but we already had instances, where we've converted a record to a class and implemented equals and hashCode again manually, so preempting this.

@timgrein timgrein added >test Issues or PRs that are addressing/adding tests :ml Machine learning Team:ML Meta label for the ML team v8.15.0 labels May 14, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @timgrein

@timgrein
Copy link
Contributor Author

@elasticmachine update branch

@timgrein timgrein merged commit 5bfe864 into elastic:main May 14, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning Team:ML Meta label for the ML team >test Issues or PRs that are addressing/adding tests v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants