Last commit broke cobertura
This commit is contained in:
parent
19b3aeed32
commit
bb1e8b9ddd
|
@ -110,7 +110,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>${logback_version}</version>
|
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<!--
|
<!-- The parent of this project is the deployable POM. This project isn't deployable, but this keeps it before the root pom in the reactor order when building the site. I don't know why this works...
|
||||||
The parent of this project is the deployable POM. This project isn't deployable,
|
Need to investigate this. -->
|
||||||
but this keeps it before the root pom in the reactor order when building the site.
|
|
||||||
I don't know why this works... Need to investigate this.
|
|
||||||
-->
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
|
@ -62,16 +58,19 @@
|
||||||
<version>${thymeleaf-version}</version>
|
<version>${thymeleaf-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Use an older version of SLF4j -->
|
<!--
|
||||||
|
Use an older version of SLF4j just to make sure we compile correctly
|
||||||
|
against old SLF4j - Some people can't upgrade and we have no real
|
||||||
|
need for recent features.
|
||||||
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.6.0</version>
|
<version>1.6.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>1.6.0</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Test Database -->
|
<!-- Test Database -->
|
||||||
|
@ -84,13 +83,11 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.derby</groupId>
|
<groupId>org.apache.derby</groupId>
|
||||||
<artifactId>derby</artifactId>
|
<artifactId>derby</artifactId>
|
||||||
<version>${derby_version}</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-dbcp</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-dbcp</artifactId>
|
<artifactId>commons-dbcp2</artifactId>
|
||||||
<version>1.4</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -205,7 +202,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>cobertura-maven-plugin</artifactId>
|
<artifactId>cobertura-maven-plugin</artifactId>
|
||||||
<version>${maven_cobertura_plugin_version}</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>false</skip>
|
<skip>false</skip>
|
||||||
<formats>
|
<formats>
|
||||||
|
@ -221,8 +217,7 @@
|
||||||
<ignore>**/valueset/*.class</ignore>
|
<ignore>**/valueset/*.class</ignore>
|
||||||
<ignore>**/exceptions/*.class</ignore>
|
<ignore>**/exceptions/*.class</ignore>
|
||||||
</excludes>
|
</excludes>
|
||||||
<!-- <ignoreMethodAnnotations> <ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation>
|
<!-- <ignoreMethodAnnotations> <ignoreMethodAnnotation>net.sourceforge.cobertura.CoverageIgnore</ignoreMethodAnnotation> </ignoreMethodAnnotations> -->
|
||||||
</ignoreMethodAnnotations> -->
|
|
||||||
</instrumentation>
|
</instrumentation>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
|
@ -321,8 +316,10 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>cobertura-maven-plugin</artifactId>
|
<artifactId>cobertura-maven-plugin</artifactId>
|
||||||
<version>${maven_cobertura_plugin_version}</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<check>
|
||||||
|
<haltOnFailure>true</haltOnFailure>
|
||||||
|
</check>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
@ -333,15 +330,10 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId>
|
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>${maven_cobertura_plugin_version}</version> <configuration> <check> <branchRate>85</branchRate>
|
||||||
<version>${maven_cobertura_plugin_version}</version> <configuration> <check>
|
<lineRate>85</lineRate> <haltOnFailure>true</haltOnFailure> <totalBranchRate>85</totalBranchRate> <totalLineRate>85</totalLineRate> <packageLineRate>85</packageLineRate> <packageBranchRate>85</packageBranchRate>
|
||||||
<branchRate>85</branchRate> <lineRate>85</lineRate> <haltOnFailure>true</haltOnFailure>
|
<regexes> <regex> <pattern>com.example.reallyimportant.*</pattern> <branchRate>90</branchRate> <lineRate>80</lineRate> </regex> <regex> <pattern>com.example.boringcode.*</pattern> <branchRate>40</branchRate>
|
||||||
<totalBranchRate>85</totalBranchRate> <totalLineRate>85</totalLineRate> <packageLineRate>85</packageLineRate>
|
<lineRate>30</lineRate> </regex> </regexes> </check> </configuration> <executions> <execution> <goals> <goal>clean</goal> <goal>check</goal> </goals> </execution> </executions> </plugin> -->
|
||||||
<packageBranchRate>85</packageBranchRate> <regexes> <regex> <pattern>com.example.reallyimportant.*</pattern>
|
|
||||||
<branchRate>90</branchRate> <lineRate>80</lineRate> </regex> <regex> <pattern>com.example.boringcode.*</pattern>
|
|
||||||
<branchRate>40</branchRate> <lineRate>30</lineRate> </regex> </regexes> </check>
|
|
||||||
</configuration> <executions> <execution> <goals> <goal>clean</goal> <goal>check</goal>
|
|
||||||
</goals> </execution> </executions> </plugin> -->
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -365,12 +357,16 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>cobertura-maven-plugin</artifactId>
|
<artifactId>cobertura-maven-plugin</artifactId>
|
||||||
<version>${maven_cobertura_plugin_version}</version>
|
|
||||||
<reportSets>
|
<reportSets>
|
||||||
<reportSet>
|
<reportSet>
|
||||||
<reports>
|
<reports>
|
||||||
<report>cobertura</report>
|
<report>cobertura</report>
|
||||||
</reports>
|
</reports>
|
||||||
|
<configuration>
|
||||||
|
<check>
|
||||||
|
<haltOnFailure>true</haltOnFailure>
|
||||||
|
</check>
|
||||||
|
</configuration>
|
||||||
</reportSet>
|
</reportSet>
|
||||||
</reportSets>
|
</reportSets>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -47,9 +47,12 @@ public class LoggingInterceptorTest {
|
||||||
/*
|
/*
|
||||||
* This is a bit funky, but it's useful for verifying that the headers actually get logged
|
* This is a bit funky, but it's useful for verifying that the headers actually get logged
|
||||||
*/
|
*/
|
||||||
myLoggerRoot = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
|
|
||||||
myMockAppender = mock(Appender.class);
|
myMockAppender = mock(Appender.class);
|
||||||
when(myMockAppender.getName()).thenReturn("MOCK");
|
when(myMockAppender.getName()).thenReturn("MOCK");
|
||||||
|
|
||||||
|
org.slf4j.Logger logger = LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
|
||||||
|
|
||||||
|
myLoggerRoot = (ch.qos.logback.classic.Logger) logger;
|
||||||
myLoggerRoot.addAppender(myMockAppender);
|
myLoggerRoot.addAppender(myMockAppender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ import ca.uhn.fhir.util.PortUtil;
|
||||||
public class ETagServerHl7OrgTest {
|
public class ETagServerHl7OrgTest {
|
||||||
|
|
||||||
private static CloseableHttpClient ourClient;
|
private static CloseableHttpClient ourClient;
|
||||||
private static FhirContext ourCtx;
|
private static FhirContext ourCtx = FhirContext.forDstu2Hl7Org();
|
||||||
private static Date ourLastModifiedDate;
|
private static Date ourLastModifiedDate;
|
||||||
private static int ourPort;
|
private static int ourPort;
|
||||||
private static Server ourServer;
|
private static Server ourServer;
|
||||||
|
@ -69,7 +69,6 @@ public class ETagServerHl7OrgTest {
|
||||||
assertEquals("W/\"222\"", cl.getValue());
|
assertEquals("W/\"222\"", cl.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAutomaticNotModified() throws Exception {
|
public void testAutomaticNotModified() throws Exception {
|
||||||
ourLastModifiedDate = new InstantDt("2012-11-25T02:34:45.2222Z").getValue();
|
ourLastModifiedDate = new InstantDt("2012-11-25T02:34:45.2222Z").getValue();
|
||||||
|
@ -80,7 +79,6 @@ public class ETagServerHl7OrgTest {
|
||||||
assertEquals(Constants.STATUS_HTTP_304_NOT_MODIFIED, status.getStatusLine().getStatusCode());
|
assertEquals(Constants.STATUS_HTTP_304_NOT_MODIFIED, status.getStatusLine().getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLastModifiedHeader() throws Exception {
|
public void testLastModifiedHeader() throws Exception {
|
||||||
ourLastModifiedDate = new InstantDt("2012-11-25T02:34:45.2222Z").getValue();
|
ourLastModifiedDate = new InstantDt("2012-11-25T02:34:45.2222Z").getValue();
|
||||||
|
@ -153,7 +151,6 @@ public class ETagServerHl7OrgTest {
|
||||||
assertEquals("Patient/2/_history/222", ourLastId.toUnqualified().getValue());
|
assertEquals("Patient/2/_history/222", ourLastId.toUnqualified().getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void afterClass() throws Exception {
|
public static void afterClass() throws Exception {
|
||||||
ourServer.stop();
|
ourServer.stop();
|
||||||
|
@ -168,7 +165,6 @@ public class ETagServerHl7OrgTest {
|
||||||
|
|
||||||
ServletHandler proxyHandler = new ServletHandler();
|
ServletHandler proxyHandler = new ServletHandler();
|
||||||
RestfulServer servlet = new RestfulServer(ourCtx);
|
RestfulServer servlet = new RestfulServer(ourCtx);
|
||||||
ourCtx = servlet.getFhirContext();
|
|
||||||
servlet.setResourceProviders(patientProvider);
|
servlet.setResourceProviders(patientProvider);
|
||||||
ServletHolder servletHolder = new ServletHolder(servlet);
|
ServletHolder servletHolder = new ServletHolder(servlet);
|
||||||
proxyHandler.addServletWithMapping(servletHolder, "/*");
|
proxyHandler.addServletWithMapping(servletHolder, "/*");
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -194,7 +194,6 @@
|
||||||
<maven_antrun_plugin_version>1.8</maven_antrun_plugin_version>
|
<maven_antrun_plugin_version>1.8</maven_antrun_plugin_version>
|
||||||
<maven_build_helper_plugin_version>1.9.1</maven_build_helper_plugin_version>
|
<maven_build_helper_plugin_version>1.9.1</maven_build_helper_plugin_version>
|
||||||
<maven_assembly_plugin_version>2.5.3</maven_assembly_plugin_version>
|
<maven_assembly_plugin_version>2.5.3</maven_assembly_plugin_version>
|
||||||
<maven_cobertura_plugin_version>2.7</maven_cobertura_plugin_version>
|
|
||||||
<maven_failsafe_plugin_version>2.18.1</maven_failsafe_plugin_version>
|
<maven_failsafe_plugin_version>2.18.1</maven_failsafe_plugin_version>
|
||||||
<maven_gpg_plugin_version>1.6</maven_gpg_plugin_version>
|
<maven_gpg_plugin_version>1.6</maven_gpg_plugin_version>
|
||||||
<maven_javadoc_plugin_version>2.10.1</maven_javadoc_plugin_version>
|
<maven_javadoc_plugin_version>2.10.1</maven_javadoc_plugin_version>
|
||||||
|
@ -222,6 +221,11 @@
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Set dependency versions -->
|
<!-- Set dependency versions -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
@ -276,7 +280,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>cobertura-maven-plugin</artifactId>
|
<artifactId>cobertura-maven-plugin</artifactId>
|
||||||
<version>${maven_cobertura_plugin_version}</version>
|
<version>2.7</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Loading…
Reference in New Issue