Skip to content

[TRANSFORM] Remove HLRC from single node tests #84220

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

Merged
merged 4 commits into from
Feb 23, 2022

Conversation

davidkyle
Copy link
Member

I moved TransformProgressIT to be a TransformSingleNodeTestCase as it uses some internal code and was difficult to write as a REST test.

The multi-node tests will be changed in another PR.

@davidkyle davidkyle added >test Issues or PRs that are addressing/adding tests :ml/Transform Transform v8.2.0 labels Feb 22, 2022
@@ -88,7 +87,7 @@ protected void createReviewsIndex(
min = 10 + (i % 49);
}
int sec = 10 + (i % 49);
String location = (user + 10) + "," + (user + 15);
String location = (((user + 10) % 180) - 90) + "," + (((user + 15) % 360) - 180);
Copy link
Member Author

Choose a reason for hiding this comment

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

Bulk upload was failing for the test TransformPivotRestSpecialCasesIT::testRestrictiveBucketSelector because the lat,lon values were outside of the range.

@@ -248,8 +248,8 @@ public void testRestrictiveBucketSelector() throws Exception {
String indexName = "special_pivot_bucket_selector_reviews";
createReviewsIndex(indexName, 1000, 327, "date", false, 5, "affiliate_id");

verifyDestIndexHitsCount(indexName, "special_pivot_bucket_selector-10", 10, 14);
verifyDestIndexHitsCount(indexName, "special_pivot_bucket_selector-10000", 10000, 14);
verifyDestIndexHitsCount(indexName, "special_pivot_bucket_selector-10", 10, 41);
Copy link
Member Author

Choose a reason for hiding this comment

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

The change here is the result of fixing the geo-coordinates that were failing bulk upload

assertEquals((4 + 10), coordinates.get(1), 0.000001);
assertEquals((4 + 15), coordinates.get(0), 0.000001);
assertEquals(-76.0, coordinates.get(1), 0.000001);
assertEquals(-161.0, coordinates.get(0), 0.000001);
Copy link
Member Author

Choose a reason for hiding this comment

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

Also due to the lat/lon change

@davidkyle davidkyle marked this pull request as ready for review February 22, 2022 13:40
@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Feb 22, 2022
@elasticmachine
Copy link
Collaborator

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

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

Thanks for fixing the bulk issue!

Just 3 nit-comments left.

@@ -477,6 +495,13 @@ protected static String getTransformState(String transformId) throws IOException
return (Map<?, ?>) transforms.get(0);
}

protected static Map<String, Object> getTransformStateAndStats(int from, int size) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since it returns a number of transforms, would it make sense to name it getTransformsStateAndStats?

}, 120, TimeUnit.SECONDS);

// We want to make sure our latest state is written before we turn the node off, this makes the testing more reliable
awaitWrittenIndexerState(CONTINUOUS_TRANSFORM_ID, IndexerState.STARTED.value());
}

private String transformConfig() {
Copy link
Contributor

Choose a reason for hiding this comment

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

static?

TestRestHighLevelClient() {
super(client(), restClient -> {}, X_CONTENT_ENTRIES);
}
private String transformConfig() {
Copy link
Contributor

Choose a reason for hiding this comment

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

static?

@davidkyle davidkyle merged commit 6155e14 into elastic:master Feb 23, 2022
@davidkyle davidkyle deleted the transform-hlrc-usages branch February 23, 2022 12:55
probakowski pushed a commit to probakowski/elasticsearch that referenced this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform Team:ML Meta label for the ML team >test Issues or PRs that are addressing/adding tests v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants