add test coverage

This commit is contained in:
Xavier Léauté 2015-03-09 13:44:54 -07:00
parent 2abdce1dc0
commit ef842b2eae
3 changed files with 68 additions and 0 deletions

View File

@ -5,3 +5,6 @@ jdk:
- oraclejdk8
sudo: false
after_success:
- mvn clean cobertura:cobertura coveralls:report

29
pom.xml
View File

@ -573,6 +573,17 @@
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
@ -655,6 +666,24 @@
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<instrumentation>
<ignores>
<ignore>io.druid.sql.antlr4.*</ignore>
</ignores>
<excludes>
<exclude>io/druid/sql/antlr4/**/*.class</exclude>
</excludes>
</instrumentation>
<format>xml</format>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
~ Licensed to Metamarkets Group Inc. (Metamarkets) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. Metamarkets licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/>
</Console>
</Appenders>
<Loggers>
<!-- Override log level for testing to reduce output size -->
<Logger name="io.druid.server.coordination.ZkCoordinator" level="warn"/>
<Logger name="io.druid.server.coordination.SingleDataSegmentAnnouncer" level="warn"/>
<Logger name="io.druid.server.coordination.BatchDataSegmentAnnouncer" level="warn"/>
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>