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

[ML] Transform test fix for testCreateLatestFunction #66293

Merged

Conversation

benwtrent
Copy link
Member

closes #66292

@benwtrent benwtrent added >test Issues or PRs that are addressing/adding tests v8.0.0 :ml/Transform Transform v7.11.0 v7.12.0 labels Dec 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

@benwtrent
Copy link
Member Author

@elasticmachine update branch

return new LatestConfig(randomList(1, 10, () -> randomAlphaOfLengthBetween(1, 10)), randomAlphaOfLengthBetween(1, 10));
return new LatestConfig(
new ArrayList<>(
new HashSet<>(randomList(1, 10, () -> randomAlphaOfLengthBetween(1, 10))

Choose a reason for hiding this comment

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

nit, ESTestCase has a method randomUnique:
randomUnique(() -> randomAlphaOfLengthBetween(1, 10), randomIntBetween(1, 10))

Copy link

@hendrikmuhs hendrikmuhs left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

@hendrikmuhs
Copy link

the same problem exists in 2 other places:

org.elasticsearch.client.transform.transforms.latest.hlrc.LatestConfigTests
org.elasticsearch.client.transform.transforms.latest.LatestConfigTests

@benwtrent can you fix those, too?

@benwtrent benwtrent merged commit 940bd86 into elastic:master Dec 15, 2020
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Dec 15, 2020
@benwtrent benwtrent deleted the test-fix/ml-fix-testCreateLatestFunction branch March 3, 2021 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform >test Issues or PRs that are addressing/adding tests v7.11.0 v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transform FunctionFactoryTests. testCreateLatestFunction fails
5 participants