You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/10/18 15:20:15 UTC

[sling-org-apache-sling-connection-timeout-agent] branch feature/SLING-8788 created (now 871533a)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch feature/SLING-8788
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-connection-timeout-agent.git.


      at 871533a  SLING-8788 - Record code coverage

This branch includes the following new commits:

     new 871533a  SLING-8788 - Record code coverage

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[sling-org-apache-sling-connection-timeout-agent] 01/01: SLING-8788 - Record code coverage

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-8788
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-connection-timeout-agent.git

commit 871533ac75e23ea2526c0e997d3d0e1ae20ebcc6
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Oct 18 17:19:31 2019 +0200

    SLING-8788 - Record code coverage
---
 pom.xml                                                    | 8 ++++++++
 src/test/java/org/apache/sling/cta/impl/AgentLauncher.java | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/pom.xml b/pom.xml
index 0a9d90e..58b15bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,6 +176,14 @@
             <version>6.0.3</version>
             <scope>test</scope>
         </dependency>
+        <!-- jacoco agent is manually added to the tests -->
+        <dependency>
+            <groupId>org.jacoco</groupId>
+            <artifactId>org.jacoco.agent</artifactId>
+            <version>0.8.4</version>
+            <scope>test</scope>
+            <classifier>runtime</classifier>
+        </dependency>
     </dependencies>
     <properties>
         <pax-exam.version>4.13.0</pax-exam.version>
diff --git a/src/test/java/org/apache/sling/cta/impl/AgentLauncher.java b/src/test/java/org/apache/sling/cta/impl/AgentLauncher.java
index a3b4113..1b4d16d 100644
--- a/src/test/java/org/apache/sling/cta/impl/AgentLauncher.java
+++ b/src/test/java/org/apache/sling/cta/impl/AgentLauncher.java
@@ -64,6 +64,8 @@ class AgentLauncher {
         ProcessBuilder pb = new ProcessBuilder(
             javaExe.toString(),
             "-showversion",
+            // order is importat - jacoco must come first for instrumentation to happen
+            "-javaagent:target/it-dependencies/org.jacoco.agent-runtime.jar=destfile=target/jacoco-it.exec",
             "-javaagent:" + jar +"=" + timeouts.agentConnectTimeout.toMillis() +"," + timeouts.agentReadTimeout.toMillis()+",v",
             "-cp",
             classPath,