You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ch...@apache.org on 2020/05/14 06:58:41 UTC

[phoenix] branch 4.x updated: PHOENIX-5891: Ensure that code coverage does not drop with subsequent commits

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

chinmayskulkarni pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new b0b7308  PHOENIX-5891: Ensure that code coverage does not drop with subsequent commits
b0b7308 is described below

commit b0b730892e73593efa38a3b51b19f48b4981207e
Author: Chinmay Kulkarni <ch...@gmail.com>
AuthorDate: Wed May 13 23:33:10 2020 -0700

    PHOENIX-5891: Ensure that code coverage does not drop with subsequent commits
---
 phoenix-pherf/pom.xml |  3 +++
 pom.xml               | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 6474110..2afb780 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -31,6 +31,9 @@
 	<properties>
 		<top.dir>${project.basedir}/..</top.dir>
 		<shaded.package>org.apache.phoenix.shaded</shaded.package>
+		<!-- JaCoCo thresholds overriden for phoenix-pherf -->
+		<jacoco.instruction.coverage.percentage>0.650</jacoco.instruction.coverage.percentage>
+		<jacoco.branch.coverage.percentage>0.500</jacoco.branch.coverage.percentage>
 	</properties>
 
 	<dependencies>
diff --git a/pom.xml b/pom.xml
index 078731f..c19e963 100644
--- a/pom.xml
+++ b/pom.xml
@@ -149,6 +149,9 @@
     <!-- Set default encoding so multi-byte tests work correctly on the Mac -->
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    <!-- JaCoCo thresholds which we can override in each sub-module if required -->
+    <jacoco.instruction.coverage.percentage>0.700</jacoco.instruction.coverage.percentage>
+    <jacoco.branch.coverage.percentage>0.600</jacoco.branch.coverage.percentage>
    <curator.version>2.12.0</curator.version>
 
   </properties>
@@ -1246,6 +1249,32 @@
                   <goal>report</goal>
                 </goals>
               </execution>
+              <execution>
+                <id>check</id>
+                <phase>verify</phase>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <rule>
+                      <element>BUNDLE</element>
+                      <limits>
+                        <limit>
+                          <counter>INSTRUCTION</counter>
+                          <value>COVEREDRATIO</value>
+                          <minimum>${jacoco.instruction.coverage.percentage}</minimum>
+                        </limit>
+                        <limit>
+                          <counter>BRANCH</counter>
+                          <value>COVEREDRATIO</value>
+                          <minimum>${jacoco.branch.coverage.percentage}</minimum>
+                        </limit>
+                      </limits>
+                    </rule>
+                  </rules>
+                </configuration>
+              </execution>
             </executions>
           </plugin>
         </plugins>