Skip to content

Commit e9f2cc1

Browse files
ckunkiSebastian Bär
andauthored
Doc/42 jacoco failure windows (#45)
* #42: Documented known issue of JaCoCo failing on Windows. Co-authored-by: Sebastian Bär <redcatbear@ursus-minor.de>
1 parent 42a5440 commit e9f2cc1

File tree

10 files changed

+52
-7
lines changed

10 files changed

+52
-7
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ venv/
3131
*.orig
3232
*.old
3333
*.md.html
34-
*.flattened-pom.xml
34+
*.flattened-pom.xml
35+
/.apt_generated/
36+
/.apt_generated_tests/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java=UTF-8
3+
encoding//src/test/java=UTF-8
4+
encoding//src/test/resources=UTF-8
5+
encoding/<project>=UTF-8
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ System property: `test.coverage`
4949

5050
This module installs a jacoco agent to the UDF JVM and receives the execution data using a TCP socket.
5151

52-
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.
52+
This module requires additional maven configuration. Use [project-keeper](https://github.com/exasol/project-keeper-maven-plugin) module `udf_coverage` to verify it.
53+
54+
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).
5355

5456
### JProfiler
5557

@@ -85,6 +87,22 @@ You can find the logs in `target/udf-logs/`. For each incoming stream (UDF insta
8587
Created log file for UDF output: target/udf-logs/udf-log-16150321841745991713.txt
8688
```
8789

90+
## Known Issue: Failing Integration Tests on Windows
91+
92+
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.
93+
94+
Steps to reproduce
95+
96+
* Use a virtual schema, e.g. https://github.com/exasol/mysql-virtual-schema
97+
* with Maven command `mvn clean verify -Dtest=MySQLSqlDialectIT`
98+
99+
Known workarounds
100+
101+
* Either run integration tests from the Eclipse IDE
102+
* or remove `.withJvmOptions(udfTestSetup.getJvmOptions())` from `ExasolObjectConfiguration.builder()`
103+
* or run tests with JVM option `-Dtest.coverage="false"`
104+
* or run integration tests inside the VM.
105+
88106
## Additional Information
89107

90108
* [Changelog](doc/changes/changelog.md)

doc/changes/changelog.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/changes/changes_0.6.5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ In this release we fixed a version collision between the BucketFS library used i
1111
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.
1212

1313
## Bugfixes
14-
15-
* #43: Fixed BucketFS library version collisions
14+
15+
* #43: Fixed BucketFS library version collisions.
1616

1717
## Dependency Updates
1818

doc/changes/changes_0.6.6.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Udf Debugging Java 0.6.6, released 2022-??-??
2+
3+
Code name: Documentation update
4+
5+
## Summary
6+
7+
Updated documentation.
8+
9+
## Features
10+
11+
* #42: Documented known issue of JaCoCo failing on Windows.
12+

pk_generated_parent.pom

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>udf-debugging-java</artifactId>
5-
<version>0.6.5</version>
5+
<version>0.6.6</version>
66
<name>udf-debugging-java</name>
77
<description>Utilities for debugging, profiling and code coverage measure for UDFs.</description>
88
<url>https://github.com/exasol/udf-debugging-java/</url>
@@ -195,7 +195,7 @@
195195
<parent>
196196
<artifactId>udf-debugging-java-generated-parent</artifactId>
197197
<groupId>com.exasol</groupId>
198-
<version>0.6.5</version>
198+
<version>0.6.6</version>
199199
<relativePath>pk_generated_parent.pom</relativePath>
200200
</parent>
201201
</project>

src/main/java/com/exasol/udfdebugging/modules/coverage/JacocoServer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ private static class Handler implements Runnable, ISessionInfoVisitor, IExecutio
9191
this.reader.setExecutionDataVisitor(this);
9292
}
9393

94+
@Override
9495
public void run() {
9596
try {
9697
while (this.reader.read()) {
@@ -107,12 +108,14 @@ public void run() {
107108
}
108109
}
109110

111+
@Override
110112
public void visitSessionInfo(final SessionInfo info) {
111113
synchronized (this.fileWriter) {
112114
this.fileWriter.visitSessionInfo(info);
113115
}
114116
}
115117

118+
@Override
116119
public void visitClassExecution(final ExecutionData data) {
117120
synchronized (this.fileWriter) {
118121
this.fileWriter.visitClassExecution(data);

0 commit comments

Comments
 (0)