[CALCITE-2347] running ElasticSearch in embedded mode for unit tests of ES adapter...
authorAndrei Sereda <andrei@nospam.com>
Thu, 31 May 2018 22:19:10 +0000 (18:19 -0400)
committerMichael Mior <mmior@uwaterloo.ca>
Thu, 21 Jun 2018 10:38:50 +0000 (06:38 -0400)
commitc12cb4b0de1baa3f7cbb9952ee350fdd1701662d
treee71eef3fc54011d8eb749cb9db2af4c44fe520ce
parent37944bb638f2d3c52f884a841c2a27532e892014
[CALCITE-2347] running ElasticSearch in embedded mode for unit tests 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/calcite#716
25 files changed:
core/src/main/java/org/apache/calcite/adapter/elasticsearch/AbstractElasticsearchTable.java
core/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchProject.java
elasticsearch2/pom.xml
elasticsearch2/src/main/java/org/apache/calcite/adapter/elasticsearch2/Elasticsearch2Enumerator.java
elasticsearch2/src/main/java/org/apache/calcite/adapter/elasticsearch2/Elasticsearch2Schema.java
elasticsearch2/src/main/java/org/apache/calcite/adapter/elasticsearch2/Elasticsearch2Table.java
elasticsearch2/src/test/java/org/apache/calcite/adapter/elasticsearch2/ElasticSearch2AdapterTest.java [new file with mode: 0644]
elasticsearch2/src/test/java/org/apache/calcite/adapter/elasticsearch2/EmbeddedElasticNode.java [new file with mode: 0644]
elasticsearch2/src/test/java/org/apache/calcite/adapter/elasticsearch2/EmbeddedElasticRule.java [new file with mode: 0644]
elasticsearch2/src/test/java/org/apache/calcite/test/ElasticChecker.java [new file with mode: 0644]
elasticsearch2/src/test/java/org/apache/calcite/test/Elasticsearch2AdapterIT.java [deleted file]
elasticsearch2/src/test/resources/elasticsearch-zips-model.json [deleted file]
elasticsearch2/src/test/resources/zips-mini.json [new file with mode: 0644]
elasticsearch5/pom.xml
elasticsearch5/src/main/java/org/apache/calcite/adapter/elasticsearch5/Elasticsearch5Schema.java
elasticsearch5/src/main/java/org/apache/calcite/adapter/elasticsearch5/Elasticsearch5Table.java
elasticsearch5/src/test/java/org/apache/calcite/adapter/elasticsearch5/ElasticSearch5AdapterTest.java [new file with mode: 0644]
elasticsearch5/src/test/java/org/apache/calcite/adapter/elasticsearch5/EmbeddedElasticNode.java [new file with mode: 0644]
elasticsearch5/src/test/java/org/apache/calcite/adapter/elasticsearch5/EmbeddedElasticRule.java [new file with mode: 0644]
elasticsearch5/src/test/java/org/apache/calcite/test/ElasticChecker.java [new file with mode: 0644]
elasticsearch5/src/test/java/org/apache/calcite/test/Elasticsearch5AdapterIT.java [deleted file]
elasticsearch5/src/test/resources/elasticsearch-zips-model.json [deleted file]
elasticsearch5/src/test/resources/log4j2.xml [new file with mode: 0644]
elasticsearch5/src/test/resources/zips-mini.json [new file with mode: 0644]
pom.xml