Skip to content

Doc/42 jacoco failure windows #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 22, 2022
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ venv/
*.orig
*.old
*.md.html
*.flattened-pom.xml
*.flattened-pom.xml
/.apt_generated/
/.apt_generated_tests/
5 changes: 5 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -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/<project>=UTF-8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions doc/changes/changes_0.6.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions doc/changes/changes_0.6.6.md
Original file line number Diff line number Diff line change
@@ -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.

2 changes: 1 addition & 1 deletion pk_generated_parent.pom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>udf-debugging-java</artifactId>
<version>0.6.5</version>
<version>0.6.6</version>
<name>udf-debugging-java</name>
<description>Utilities for debugging, profiling and code coverage measure for UDFs.</description>
<url>https://github.com/exasol/udf-debugging-java/</url>
Expand Down Expand Up @@ -195,7 +195,7 @@
<parent>
<artifactId>udf-debugging-java-generated-parent</artifactId>
<groupId>com.exasol</groupId>
<version>0.6.5</version>
<version>0.6.6</version>
<relativePath>pk_generated_parent.pom</relativePath>
</parent>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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);
Expand Down