Fix some tests

This commit is contained in:
James Agnew 2016-06-14 22:03:24 -04:00
parent f3dcc3e893
commit e2f1beef2c
10 changed files with 154 additions and 32 deletions

View File

@ -138,6 +138,29 @@
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<classFolders>
<classFolder>${basedir}/target/classes</classFolder>
<classFolder>${basedir}/../hapi-fhir-base/target/classes</classFolder>
</classFolders>
<sourceFolders>
<sourceFolder>${basedir}/src/main/java</sourceFolder>
<sourceFolder>${basedir}/../hapi-fhir-base/src/main/java</sourceFolder>
</sourceFolders>
<dumpOnExit>true</dumpOnExit>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>

View File

@ -28,7 +28,6 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@ -56,12 +55,14 @@ import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Fields;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;
import org.hibernate.search.indexes.interceptor.DontInterceptEntityInterceptor;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum;
import ca.uhn.fhir.jpa.search.DeferConceptIndexingInterceptor;
//@formatter:off
@Entity
@Indexed()
@Indexed(interceptor=DeferConceptIndexingInterceptor.class)
@Table(name="TRM_CONCEPT", uniqueConstraints= {
@UniqueConstraint(name="IDX_CONCEPT_CS_CODE", columnNames= {"CODESYSTEM_PID", "CODE"})
}, indexes= {

View File

@ -35,8 +35,6 @@ import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum;
@Entity
@Table(name="TRM_CONCEPT_PC_LINK")
public class TermConceptParentChildLink implements Serializable {

View File

@ -0,0 +1,9 @@
package ca.uhn.fhir.jpa.search;
import org.hibernate.search.indexes.interceptor.DontInterceptEntityInterceptor;
public class DeferConceptIndexingInterceptor extends DontInterceptEntityInterceptor
//implements EntityIndexingInterceptor<TermConcept>
{
// nothing for now
}

View File

@ -15,7 +15,6 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import ca.uhn.fhir.jpa.dao.DaoConfig;
import ca.uhn.fhir.jpa.provider.dstu3.TerminologyUploaderProviderDstu3;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
import ca.uhn.fhir.validation.ResultSeverityEnum;

View File

@ -1491,7 +1491,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test {
List<Date> preDates = Lists.newArrayList();
List<String> ids = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
Thread.sleep(10);
Thread.sleep(100);
preDates.add(new Date());
patient.setId(id);
patient.getName().get(0).getFamily().get(0).setValue(methodName + "_i");

View File

@ -137,6 +137,28 @@
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<classFolders>
<classFolder>${basedir}/target/classes</classFolder>
<classFolder>${basedir}/../hapi-fhir-base/target/classes</classFolder>
</classFolders>
<sourceFolders>
<sourceFolder>${basedir}/src/main/java</sourceFolder>
<sourceFolder>${basedir}/../hapi-fhir-base/src/main/java</sourceFolder>
</sourceFolders>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-tinder-plugin</artifactId>

View File

@ -146,6 +146,28 @@
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<classFolders>
<classFolder>${basedir}/target/classes</classFolder>
<classFolder>${basedir}/../hapi-fhir-base/target/classes</classFolder>
</classFolders>
<sourceFolders>
<sourceFolder>${basedir}/src/main/java</sourceFolder>
<sourceFolder>${basedir}/../hapi-fhir-base/src/main/java</sourceFolder>
</sourceFolders>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-tinder-plugin</artifactId>

View File

@ -177,6 +177,28 @@
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<classFolders>
<classFolder>${basedir}/target/classes</classFolder>
<classFolder>${basedir}/../hapi-fhir-base/target/classes</classFolder>
</classFolders>
<sourceFolders>
<sourceFolder>${basedir}/src/main/java</sourceFolder>
<sourceFolder>${basedir}/../hapi-fhir-base/src/main/java</sourceFolder>
</sourceFolders>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

78
pom.xml
View File

@ -804,7 +804,7 @@
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder>
<argLine>-Dfile.encoding=UTF-8 -Xmx712m</argLine>
<argLine>${argLine} -Dfile.encoding=UTF-8 -Xmx712m</argLine>
<forkCount>1</forkCount>
<!--<reuseForks>false</reuseForks> -->
</configuration>
@ -860,6 +860,11 @@
</coberturaReports>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
@ -1123,7 +1128,8 @@
<replace dir="target/site" summary="true">
<include name="*.html"/>
<replacetoken>\t</replacetoken>
<replacevalue> </replacevalue>
<replacevalue>
</replacevalue>
</replace>
<replace dir="target/site" summary="true">
<include name="index.html"/>
@ -1367,6 +1373,30 @@
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>jacoco-merge</id>
<goals>
<goal>merge</goal>
</goals>
<phase>install</phase>
<inherited>false</inherited>
<configuration>
<fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
<directory>hapi-fhir-base/target</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</configuration>
</execution>
</executions>
</plugin>
-->
<!-- <plugin> <groupId>com.github.github</groupId> <artifactId>site-maven-plugin</artifactId> <version>0.12</version> <configuration> <message>Building site for ${project.version}</message> <server>github</server>
</configuration> <executions> <execution> <goals> <goal>site</goal> </goals> <phase>site-deploy</phase> </execution> </executions> </plugin> -->
</plugins>
@ -1376,6 +1406,21 @@
<plugins>
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <reportSets> <reportSet> <reports><report>checkstyle-aggregate</report></reports> </reportSet>
</reportSets> <configuration> <configLocation>config/sun_checks.xml</configLocation> <includes> hapi-fhir-base/src/main/java/**/*.java </includes> </configuration> </plugin> -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
<configuration>
<dataFileIncludes>${baseDir}/hapi-fhir-base/target/jacoco.exec</dataFileIncludes>
</configuration>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
@ -1524,30 +1569,11 @@
<modules>
<module>hapi-deployable-pom</module>
<module>hapi-fhir-base</module>
<!--<module>hapi-fhir-oauth2</module> -->
<module>hapi-fhir-base-test-mindeps-client</module>
<module>hapi-fhir-base-test-mindeps-server</module>
<module>hapi-tinder-plugin</module>
<module>hapi-tinder-test</module>
<module>hapi-fhir-structures-dstu</module>
<module>hapi-fhir-validation-resources-dstu2</module>
<module>hapi-fhir-structures-dstu2</module>
<module>hapi-fhir-structures-hl7org-dstu2</module>
<module>hapi-fhir-validation-resources-dstu3</module>
<module>hapi-fhir-structures-dstu3</module>
<module>hapi-fhir-jaxrsserver-base</module>
<module>hapi-fhir-jaxrsserver-example</module>
<module>hapi-fhir-jpaserver-base</module>
<module>hapi-fhir-jpaserver-example</module>
<module>restful-server-example</module>
<module>restful-server-example-test</module>
<module>hapi-fhir-testpage-overlay</module>
<module>hapi-fhir-jpaserver-uhnfhirtest</module>
<module>hapi-fhir-android</module>
<module>hapi-fhir-cli</module>
<module>hapi-fhir-dist</module>
<module>examples</module>
<module>hapi-fhir-base-example-embedded-ws</module>
<!-- <module>hapi-fhir-base-test-mindeps-client</module> <module>hapi-fhir-base-test-mindeps-server</module> <module>hapi-tinder-plugin</module> <module>hapi-tinder-test</module> <module>hapi-fhir-structures-dstu</module>
<module>hapi-fhir-validation-resources-dstu2</module> <module>hapi-fhir-structures-dstu2</module> <module>hapi-fhir-structures-hl7org-dstu2</module> <module>hapi-fhir-validation-resources-dstu3</module>
<module>hapi-fhir-structures-dstu3</module> <module>hapi-fhir-jaxrsserver-base</module> <module>hapi-fhir-jaxrsserver-example</module> <module>hapi-fhir-jpaserver-base</module> <module>hapi-fhir-jpaserver-example</module>
<module>restful-server-example</module> <module>restful-server-example-test</module> <module>hapi-fhir-testpage-overlay</module> <module>hapi-fhir-jpaserver-uhnfhirtest</module> <module>hapi-fhir-android</module>
<module>hapi-fhir-cli</module> <module>hapi-fhir-dist</module> <module>examples</module> <module>hapi-fhir-base-example-embedded-ws</module> -->
</modules>
</profile>
<profile>