diff --git a/.gitignore b/.gitignore index 131ad3b..88ee192 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,6 @@ venv/ *.orig *.old *.md.html -*.flattened-pom.xml \ No newline at end of file +*.flattened-pom.xml +/.apt_generated/ +/.apt_generated_tests/ diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..cdfe4f1 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/README.md b/README.md index 50779b5..ba0ad23 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,9 @@ System property: `test.coverage` This module installs a jacoco agent to the UDF JVM and receives the execution data using a TCP socket. -This module requires additional maven configuration. Use the [project-keeper's](https://github.com/exasol/project-keeper-maven-plugin) `udf_coverage` module to verify it. +This module requires additional maven configuration. Use [project-keeper](https://github.com/exasol/project-keeper-maven-plugin) module `udf_coverage` to verify it. + +Please note that using a [JaCoCo agent](https://www.jacoco.org/jacoco/trunk/doc/agent.html) fails when running on Windows using a [Docker image](https://docs.docker.com/glossary/#container-image) in a Linux virtual machine, see known issue [Failing Integration Tests on Windows](#known-issue:-failing-integration-tests-on-windows). ### JProfiler @@ -85,6 +87,22 @@ You can find the logs in `target/udf-logs/`. For each incoming stream (UDF insta Created log file for UDF output: target/udf-logs/udf-log-16150321841745991713.txt ``` +## Known Issue: Failing Integration Tests on Windows + +Please note that integration tests fail when running on Windows using a Docker image in a Linux virtual machine due to JaCoCo agent obtaining the [Code Coverage](#code-coverage) in the UDF. + +Steps to reproduce + +* Use a virtual schema, e.g. https://github.com/exasol/mysql-virtual-schema +* with Maven command `mvn clean verify -Dtest=MySQLSqlDialectIT` + +Known workarounds + +* Either run integration tests from the Eclipse IDE +* or remove `.withJvmOptions(udfTestSetup.getJvmOptions())` from `ExasolObjectConfiguration.builder()` +* or run tests with JVM option `-Dtest.coverage="false"` +* or run integration tests inside the VM. + ## Additional Information * [Changelog](doc/changes/changelog.md) diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 61459de..8872a21 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [0.6.6](changes_0.6.6.md) * [0.6.5](changes_0.6.5.md) * [0.6.4](changes_0.6.4.md) * [0.6.3](changes_0.6.3.md) diff --git a/doc/changes/changes_0.6.5.md b/doc/changes/changes_0.6.5.md index 4b22577..7a03839 100644 --- a/doc/changes/changes_0.6.5.md +++ b/doc/changes/changes_0.6.5.md @@ -11,8 +11,8 @@ In this release we fixed a version collision between the BucketFS library used i This project depends on an Amazon AWS SDK which in turn depends on the Netty HTTP server version 4.1.77. This versions has a vulnerability in certificate validation that can allow to man-in-the-middle attacks. Unfortunately, no update of the AWS SDK is available at the time of this release. ## Bugfixes - -* #43: Fixed BucketFS library version collisions + +* #43: Fixed BucketFS library version collisions. ## Dependency Updates diff --git a/doc/changes/changes_0.6.6.md b/doc/changes/changes_0.6.6.md new file mode 100644 index 0000000..48640aa --- /dev/null +++ b/doc/changes/changes_0.6.6.md @@ -0,0 +1,12 @@ +# Udf Debugging Java 0.6.6, released 2022-??-?? + +Code name: Documentation update + +## Summary + +Updated documentation. + +## Features + +* #42: Documented known issue of JaCoCo failing on Windows. + diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index daaec1c..f851b3b 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol udf-debugging-java-generated-parent - 0.6.5 + 0.6.6 pom UTF-8 diff --git a/pom.xml b/pom.xml index 3765317..f669c12 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 udf-debugging-java - 0.6.5 + 0.6.6 udf-debugging-java Utilities for debugging, profiling and code coverage measure for UDFs. https://github.com/exasol/udf-debugging-java/ @@ -195,7 +195,7 @@ udf-debugging-java-generated-parent com.exasol - 0.6.5 + 0.6.6 pk_generated_parent.pom diff --git a/src/main/java/com/exasol/udfdebugging/modules/coverage/JacocoServer.java b/src/main/java/com/exasol/udfdebugging/modules/coverage/JacocoServer.java index f80f868..46a1b81 100644 --- a/src/main/java/com/exasol/udfdebugging/modules/coverage/JacocoServer.java +++ b/src/main/java/com/exasol/udfdebugging/modules/coverage/JacocoServer.java @@ -91,6 +91,7 @@ private static class Handler implements Runnable, ISessionInfoVisitor, IExecutio this.reader.setExecutionDataVisitor(this); } + @Override public void run() { try { while (this.reader.read()) { @@ -107,12 +108,14 @@ public void run() { } } + @Override public void visitSessionInfo(final SessionInfo info) { synchronized (this.fileWriter) { this.fileWriter.visitSessionInfo(info); } } + @Override public void visitClassExecution(final ExecutionData data) { synchronized (this.fileWriter) { this.fileWriter.visitClassExecution(data);