jhorcicka commented on a change in pull request #229: Upgrade to Elasticsearch 7.3.1 URL: https://github.com/apache/metamodel/pull/229#discussion_r331912849
########## File path: elasticsearch/rest/src/test/java/org/apache/metamodel/elasticsearch/rest/ElasticSearchRestDataContextIT.java ########## @@ -155,14 +163,24 @@ public void testDocumentIdAsPrimaryKey() throws Exception { } } + private void indexType2TweeterDocuments() throws IOException { + indexTweeterDocument(1); + indexTweeterDocument(2, null); + indexTweeterDocument(1); + + dataContext.refreshSchemas(); + } + @Test public void testExecutePrimaryKeyLookupQuery() throws Exception { - Table table = dataContext.getDefaultSchema().getTableByName("tweet2"); - Column[] pks = table.getPrimaryKeys().toArray(new Column[0]); + indexType2TweeterDocuments(); + + final Table table = dataContext.getDefaultSchema().getTableByName(DEFAULT_TABLE_NAME); + final Column[] pks = table.getPrimaryKeys().toArray(new Column[0]); Review comment: Please use a better name (primaryKeys, primaryKeyColumns). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services