From 941065bc565b298a1e94a213fd3eccbc51e459b5 Mon Sep 17 00:00:00 2001 From: Zhongnan Su Date: Tue, 24 Mar 2020 14:30:14 -0700 Subject: [PATCH] Update release doc for v1.6.0.0 and fix issue in IT test with external cluster (#393) * fix failure in IT test with external cluster * update release doc --- opendistro-elasticsearch-sql.release-notes.md | 5 +++- .../sql/esintgtest/SQLIntegTestCase.java | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/opendistro-elasticsearch-sql.release-notes.md b/opendistro-elasticsearch-sql.release-notes.md index 746b06642a..f2ff350003 100644 --- a/opendistro-elasticsearch-sql.release-notes.md +++ b/opendistro-elasticsearch-sql.release-notes.md @@ -1,4 +1,4 @@ -## 2020-03-17 Version 1.6.0.0 (Current) +## 2020-03-24 Version 1.6.0.0 (Current) ### Features #### Elasticsearch Compatibility @@ -6,6 +6,7 @@ #### Testing * Feature [#374](https://github.com/opendistro-for-elasticsearch/sql/pull/374): Integration test with external ES cluster (issue: [353](https://github.com/opendistro-for-elasticsearch/sql/issues/353)) +* Feature [#384](https://github.com/opendistro-for-elasticsearch/sql/pull/384): CI/CD using github Actions workflow #### Documentation * Feature [#366](https://github.com/opendistro-for-elasticsearch/sql/pull/366): Documentation for simple query (issue: [#363](https://github.com/opendistro-for-elasticsearch/sql/issues/363)) @@ -20,8 +21,10 @@ * Enhancement [#372](https://github.com/opendistro-for-elasticsearch/sql/pull/372): Modified the wording of exception messages and created the troubleshooting page(issue: [#320](https://github.com/opendistro-for-elasticsearch/sql/issues/320)) ### Bugfixes +* Bugfix [#310](https://github.com/opendistro-for-elasticsearch/sql/pull/310): Add DATETIME cast support (issue: [#268](https://github.com/opendistro-for-elasticsearch/sql/issues/268)) * BugFix [#365](https://github.com/opendistro-for-elasticsearch/sql/pull/365): Return Correct Type Information for Fields (issue: [#316](https://github.com/opendistro-for-elasticsearch/sql/issues/316)) * BugFix [#377](https://github.com/opendistro-for-elasticsearch/sql/pull/377): Return object type for field which has implicit object datatype when describe the table (issue:[sql-jdbc#57](https://github.com/opendistro-for-elasticsearch/sql-jdbc/issues/57)) +* BugFix [#381](https://github.com/opendistro-for-elasticsearch/sql/pull/381): FIX field function name letter case preserved in select with group by (issue: [#373](https://github.com/opendistro-for-elasticsearch/sql/issues/373)) ## 2020-01-24, Version 1.4.0 diff --git a/src/test/java/com/amazon/opendistroforelasticsearch/sql/esintgtest/SQLIntegTestCase.java b/src/test/java/com/amazon/opendistroforelasticsearch/sql/esintgtest/SQLIntegTestCase.java index b137201d27..19c8081927 100644 --- a/src/test/java/com/amazon/opendistroforelasticsearch/sql/esintgtest/SQLIntegTestCase.java +++ b/src/test/java/com/amazon/opendistroforelasticsearch/sql/esintgtest/SQLIntegTestCase.java @@ -15,6 +15,7 @@ package com.amazon.opendistroforelasticsearch.sql.esintgtest; +import com.google.common.base.Strings; import org.elasticsearch.client.Request; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.Response; @@ -26,7 +27,6 @@ import org.junit.Before; import javax.management.MBeanServerInvocationHandler; -import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; @@ -107,23 +107,25 @@ public interface IProxy { } @AfterClass - public static void dumpCoverage() throws IOException, MalformedObjectNameException { + public static void dumpCoverage() { // jacoco.dir is set in sqlplugin-coverage.gradle, if it doesn't exist we don't // want to collect coverage so we can return early String jacocoBuildPath = System.getProperty("jacoco.dir"); - if (jacocoBuildPath.isEmpty()) { + if (Strings.isNullOrEmpty(jacocoBuildPath)) { return; } String serverUrl = "service:jmx:rmi:///jndi/rmi://127.0.0.1:7777/jmxrmi"; - JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(serverUrl)); - IProxy proxy = MBeanServerInvocationHandler.newProxyInstance( - connector.getMBeanServerConnection(), new ObjectName("org.jacoco:type=Runtime"), IProxy.class, - false); - - Path path = Paths.get(jacocoBuildPath + "/integTest.exec"); - Files.write(path, proxy.getExecutionData(false)); - connector.close(); + try(JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(serverUrl))) { + IProxy proxy = MBeanServerInvocationHandler.newProxyInstance( + connector.getMBeanServerConnection(), new ObjectName("org.jacoco:type=Runtime"), IProxy.class, + false); + + Path path = Paths.get(jacocoBuildPath + "/integTest.exec"); + Files.write(path, proxy.getExecutionData(false)); + } catch (Exception ex) { + throw new RuntimeException("Failed to dump coverage", ex); + } } /**