-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-2347] running ElasticSearch embedded mode in unit tests (for ES adapter) #716
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
|
@beikov Can you weigh in on this given your recent work on the ES? |
|
I'm still on vacation so I can only have a deeper look next week. Overall this looks ok though. |
be61146 to
69e94dc
Compare
e5b0506 to
f397024
Compare
beikov
left a comment
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.
Apart from the question regarding the package, this looks good to me.
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.elasticsearch.node; |
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.
Is it intended that this class is in this package rather than in the org.apache.calcite namespace?
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.
Hmm somehow I though that particular Node constructor is package private (which is not the case) LocalNode has been moved as inner class of EmbeddedNode. No more org.elasticsearch packages.
…of ES adapter (Andrei Sereda) After discussion on dev-list Integration tests (for ES) have been removed. They're now superseded by unit tests (which execute queries against a real elastic instance) Added local file (zips-mini.json) which contains a small subset of original zips.json (allows to bootstrap tests faster) Created separate ES JUnit rule which can be re-used across different tests. Both v2 and v5 of ES adapters are supported.
f397024 to
4c55691
Compare
|
That package has been removed. |
|
Looks good to me now. Anything to add @michaelmior ? |
|
Sorry for the delay. Looks good to me as well! |
…of ES adapter (Andrei Sereda) After discussion on dev-list Integration tests (for ES) have been removed. They're now superseded by unit tests (which execute queries against a real elastic instance) Added local file (zips-mini.json) which contains a small subset of original zips.json (allows to bootstrap tests faster) Created separate ES JUnit rule which can be re-used across different tests. Both v2 and v5 of ES adapters are supported. Close apache#716
…of ES adapter (Andrei Sereda) After discussion on dev-list Integration tests (for ES) have been removed. They're now superseded by unit tests (which execute queries against a real elastic instance) Added local file (zips-mini.json) which contains a small subset of original zips.json (allows to bootstrap tests faster) Created separate ES JUnit rule which can be re-used across different tests. Both v2 and v5 of ES adapters are supported. Close apache#716
…of ES adapter (Andrei Sereda) After discussion on dev-list Integration tests (for ES) have been removed. They're now superseded by unit tests (which execute queries against a real elastic instance) Added local file (zips-mini.json) which contains a small subset of original zips.json (allows to bootstrap tests faster) Created separate ES JUnit rule which can be re-used across different tests. Both v2 and v5 of ES adapters are supported. Close apache#716 Change-Id: Ia068308cb4a8cd5dc624f5c59c5911e055959ad5
Allows ES adapter tests to run against real ElasticSearch resource. That instance is started programmatically and embedded in current java process (as part of junit test).
Major benefit of such setup is that there is no dependency on external resource (or process). Integration tests (for this adapter) can now run at build time improving test coverage of the library. Another convenience is that users can define their own indexes and data, validating more edge-cases (like booleans, nested documents unusual attribute names etc.) for this adapter.
This particular PR is a prelude towards aforementioned goal and doesn't contain actual IT tests (which currently fail). They will be corrected and migrated in a separate commit.