Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix failure in IT test with external cluster #393

Merged
merged 4 commits into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion opendistro-elasticsearch-sql.release-notes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## 2020-03-17 Version 1.6.0.0 (Current)
## 2020-03-24 Version 1.6.0.0 (Current)

### Features
#### Elasticsearch Compatibility
* Feature [#376](https://github.com/opendistro-for-elasticsearch/sql/issues/376): Elasticsearch 7.6.1 compatibility

#### 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))
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}
}

/**
Expand Down