-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] Fix unit test failure in RestHighLevelClientTests #36
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -660,7 +660,7 @@ public void testDefaultNamedXContents() { | |
|
||
public void testProvidedNamedXContents() { | ||
List<NamedXContentRegistry.Entry> namedXContents = RestHighLevelClient.getProvidedNamedXContents(); | ||
assertEquals(75, namedXContents.size()); | ||
assertEquals(13, namedXContents.size()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aha, is this because of the xpack content removal? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Nick, as far as I find, it's due to the removal of x-pack "ml", but just a rough investigation. |
||
Map<Class<?>, Integer> categories = new HashMap<>(); | ||
List<String> names = new ArrayList<>(); | ||
for (NamedXContentRegistry.Entry namedXContent : namedXContents) { | ||
|
@@ -670,7 +670,7 @@ public void testProvidedNamedXContents() { | |
categories.put(namedXContent.categoryClass, counter + 1); | ||
} | ||
} | ||
assertEquals("Had: " + categories, 14, categories.size()); | ||
assertEquals("Had: " + categories, 3, categories.size()); | ||
assertEquals(Integer.valueOf(3), categories.get(Aggregation.class)); | ||
assertTrue(names.contains(ChildrenAggregationBuilder.NAME)); | ||
assertTrue(names.contains(MatrixStatsAggregationBuilder.NAME)); | ||
|
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.
which test is failing because of this? the concern here is that ILM is an xpack feature, so we're not going to want to keep this ParseField around. Do you want to open a separate PR to cleanly remove ILM from DataStreams or do you want to remove it in this PR (I see this PR is a WIP)?
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.
oh I see:
I think we should remove
ilm_policy
altogether fromGetDataStreamAction.java
instead of adding it back in. Looks like this was a side effect of reverting the DataStream commit.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.
Got it. I will hold the ILM part on for now.
The reason I added back was I saw the other part of codes in the original PR was already reverted into this repo, and the license header was Apache 2.0.
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.
I know ODFE Index Mangement plugin is doing the job for Index Lifecycle, so seems there is something needs to be coordinated.
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.
I think we're safe to remove the ILM stuff altogether for now and we can revert those PRs if the Index Management team wants them back in?
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.
I'm going to remove the change related to "ilm_policy" in this PR, and actually it's not a part of "RestHighLevelClientTests" class 😉