Skip to content

Commit 9823720

Browse files
committed
ARROW-17840: [Java] Disable flaky JaCoCo coverage check
The check doesn't add much value, and makes things flaky because whether a branch is covered or not can come down to chance based on where exactly an exception occurs.
1 parent 7808280 commit 9823720

1 file changed

Lines changed: 9 additions & 116 deletions

File tree

  • java/flight/flight-sql-jdbc-driver

‎java/flight/flight-sql-jdbc-driver/pom.xml‎

Lines changed: 9 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<org.apache.arrow.flight.version>${project.parent.version}</org.apache.arrow.flight.version>
3333
<org.apache.arrow.flight.jdbc-driver.name>${project.name}</org.apache.arrow.flight.jdbc-driver.name>
3434
<org.apache.arrow.flight.jdbc-driver.version>${project.version}</org.apache.arrow.flight.jdbc-driver.version>
35-
<jacoco.ut.execution.data.file>${project.build.directory}/coverage-reports/jacoco-ut.html</jacoco.ut.execution.data.file>
3635
</properties>
3736

3837
<dependencies>
@@ -154,6 +153,15 @@
154153
</resource>
155154
</resources>
156155
<plugins>
156+
<plugin>
157+
<artifactId>maven-surefire-plugin</artifactId>
158+
<configuration>
159+
<enableAssertions>false</enableAssertions>
160+
<systemPropertyVariables>
161+
<arrow.test.dataRoot>${project.basedir}/../../../testing/data</arrow.test.dataRoot>
162+
</systemPropertyVariables>
163+
</configuration>
164+
</plugin>
157165
<plugin>
158166
<groupId>org.apache.maven.plugins</groupId>
159167
<artifactId>maven-shade-plugin</artifactId>
@@ -250,121 +258,6 @@
250258
</execution>
251259
</executions>
252260
</plugin>
253-
<plugin>
254-
<groupId>org.jacoco</groupId>
255-
<artifactId>jacoco-maven-plugin</artifactId>
256-
<version>0.8.8</version>
257-
<executions>
258-
<execution>
259-
<goals>
260-
<goal>prepare-agent</goal>
261-
</goals>
262-
<configuration>
263-
<!-- Sets the path to the file which contains the execution data. -->
264-
<destFile>${jacoco.ut.execution.data.file}</destFile>
265-
<!--
266-
Sets the name of the property containing the settings
267-
for JaCoCo runtime agent.
268-
-->
269-
<propertyName>surefireArgLine</propertyName>
270-
</configuration>
271-
</execution>
272-
<!-- attached to Maven test phase -->
273-
<execution>
274-
<id>report</id>
275-
<phase>test</phase>
276-
<goals>
277-
<goal>report</goal>
278-
</goals>
279-
<configuration>
280-
<!-- Sets the path to the file which contains the execution data. -->
281-
<dataFile>${jacoco.ut.execution.data.file}</dataFile>
282-
<!-- Sets the output directory for the code coverage report. -->
283-
<!-- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>-->
284-
</configuration>
285-
</execution>
286-
<execution>
287-
<id>check</id>
288-
<goals>
289-
<goal>check</goal>
290-
</goals>
291-
<configuration>
292-
<dataFile>${jacoco.ut.execution.data.file}</dataFile>
293-
<rules>
294-
<rule>
295-
<element>CLASS</element>
296-
<excludes>
297-
<exclude>org.apache.arrow.driver.jdbc.utils.ArrowFlightConnectionConfigImpl</exclude>
298-
<!-- The uncovered branch is unreachable -->
299-
<exclude>org.apache.arrow.driver.jdbc.utils.UrlParser</exclude>
300-
</excludes>
301-
<limits>
302-
<limit implementation="org.jacoco.report.check.Limit">
303-
<counter>BRANCH</counter>
304-
<value>COVEREDRATIO</value>
305-
<minimum>0.80</minimum>
306-
</limit>
307-
</limits>
308-
</rule>
309-
</rules>
310-
</configuration>
311-
</execution>
312-
</executions>
313-
</plugin>
314261
</plugins>
315262
</build>
316-
317-
<profiles>
318-
<profile>
319-
<id>jdk8</id>
320-
<activation>
321-
<jdk>1.8</jdk>
322-
</activation>
323-
<build>
324-
<plugins>
325-
<plugin>
326-
<groupId>org.apache.maven.plugins</groupId>
327-
<artifactId>maven-surefire-plugin</artifactId>
328-
<configuration>
329-
<!-- Sets the VM argument line used when unit tests are run. -->
330-
<argLine>${surefireArgLine}</argLine>
331-
<excludes>
332-
<exclude>**/IT*.java</exclude>
333-
</excludes>
334-
<enableAssertions>false</enableAssertions>
335-
<systemPropertyVariables>
336-
<arrow.test.dataRoot>${project.basedir}/../../../testing/data</arrow.test.dataRoot>
337-
</systemPropertyVariables>
338-
</configuration>
339-
</plugin>
340-
</plugins>
341-
</build>
342-
</profile>
343-
344-
<profile>
345-
<id>jdk9+</id>
346-
<activation>
347-
<jdk>[9,]</jdk>
348-
</activation>
349-
<build>
350-
<plugins>
351-
<plugin>
352-
<groupId>org.apache.maven.plugins</groupId>
353-
<artifactId>maven-surefire-plugin</artifactId>
354-
<configuration>
355-
<!-- Sets the VM argument line used when unit tests are run. -->
356-
<argLine>${surefireArgLine} --add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
357-
<excludes>
358-
<exclude>**/IT*.java</exclude>
359-
</excludes>
360-
<enableAssertions>false</enableAssertions>
361-
<systemPropertyVariables>
362-
<arrow.test.dataRoot>${project.basedir}/../../../testing/data</arrow.test.dataRoot>
363-
</systemPropertyVariables>
364-
</configuration>
365-
</plugin>
366-
</plugins>
367-
</build>
368-
</profile>
369-
</profiles>
370263
</project>

0 commit comments

Comments
 (0)