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
Remove easy uses of setAccessible in tests. #13537
Conversation
Don't worry, I will fix the rest. But some of those remaining will need a lucene upgrade, we need to add a getter or two for tests to do things cleanly.
@@ -293,6 +293,8 @@ | |||
<include>org/elasticsearch/common/util/MockBigArrays$*.class</include> | |||
<include>org/elasticsearch/node/NodeMocksPlugin.class</include> | |||
<include>org/elasticsearch/node/MockNode.class</include> | |||
<include>org/elasticsearch/node/MockNode.class</include> |
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.
My is mock node duplicated?
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 committed a fix for this
// the close() method of a lucene analyzer sets the storedValue field to null | ||
// we simply check this via reflection - ugly but works | ||
private void assertLuceneAnalyzersAreNotClosed(Map<PreBuiltAnalyzers, List<Version>> loadedAnalyzers) throws IllegalAccessException, NoSuchFieldException { | ||
// ensure analyzers are still open by checking there is no ACE |
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.
nice simplification
LGTM |
Remove easy uses of setAccessible in tests.
I just backported this to 2.x |
Don't worry, I will fix the rest. But some of those remaining will need a lucene upgrade,
we need to add a getter or two for tests to do things cleanly.