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 07:00:11 UTC

[phoenix] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


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

commit c5be82757930b4c256c95947b11487b7a686212b
Author: Chinmay Kulkarni <ch...@gmail.com>
AuthorDate: Wed May 13 23:48:01 2020 -0700

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

diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index a156318..3ac6898 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -41,6 +41,9 @@
     <system-rules.version>1.8.0</system-rules.version>
     <stax.version>1.0.1</stax.version>
     <jaxb.version>2.2.11</jaxb.version>
+    <!-- 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>
 
   <dependencyManagement>
diff --git a/pom.xml b/pom.xml
index fc8bb9d..0392dfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,7 +144,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>
   </properties>
 
   <build>
@@ -1542,6 +1544,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>