-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[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
Conversation
@@ -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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
Pinging @elastic/ml-core (Team:ML) |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static?
I moved
TransformProgressIT
to be aTransformSingleNodeTestCase
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.