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

Fix XPackPlugin usages in tests #47252

Merged

Conversation

henningandersen
Copy link
Contributor

XPackPlugin holds data in statics and can only be initialized once. This
caused tests to fail primarily when running with a low max-workers.

Replaced usages with the LocalStateCompositeXPackPlugin, which handles
this properly for testing.

XPackPlugin holds data in statics and can only be initialized once. This
caused tests to fail primarily when running with a low max-workers.

Replaced usages with the LocalStateCompositeXPackPlugin, which handles
this properly for testing.
@henningandersen henningandersen added >test Issues or PRs that are addressing/adding tests :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.5.0 v7.4.1 labels Sep 27, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@henningandersen
Copy link
Contributor Author

henningandersen commented Sep 27, 2019

Example build failure:
https://gradle-enterprise.elastic.co/s/tukf2jknnctds/tests/53qdx3jsxipjk-c7hxkl3or5ffe?openStackTraces=WzJd

java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]Open stacktrace
Caused by: java.lang.reflect.InvocationTargetException: (No message provided)
Caused by: org.apache.lucene.util.SetOnce$AlreadySetException: The object cannot be set twice!
at org.apache.lucene.util.SetOnce.set(SetOnce.java:69)
at org.elasticsearch.xpack.core.XPackPlugin.setSslService(XPackPlugin.java:154)

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Makes sense, LGTM.

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@henningandersen henningandersen merged commit 3996477 into elastic:master Oct 2, 2019
henningandersen added a commit that referenced this pull request Oct 2, 2019
XPackPlugin holds data in statics and can only be initialized once. This
caused tests to fail primarily when running with a low max-workers.

Replaced usages with the LocalStateCompositeXPackPlugin, which handles
this properly for testing.
henningandersen added a commit that referenced this pull request Oct 2, 2019
XPackPlugin holds data in statics and can only be initialized once. This
caused tests to fail primarily when running with a low max-workers.

Replaced usages with the LocalStateCompositeXPackPlugin, which handles
this properly for testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test Issues or PRs that are addressing/adding tests v7.4.1 v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants