Test fixes
This commit is contained in:
parent
994f09e125
commit
b463b072c8
|
@ -25,6 +25,26 @@ Note also that after the release of the FHIR DSTU2 specification, the FHIR
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>HAPI FHIR 5.4.0</td>
|
||||||
|
<td>JDK8</td>
|
||||||
|
<td class="versions-table-cell-empty"></td>
|
||||||
|
<td class="versions-table-cell-draft">1.0.2</td>
|
||||||
|
<td class="versions-table-cell-release">1.4.0</td>
|
||||||
|
<td class="versions-table-cell-draft">3.0.2</td>
|
||||||
|
<td class="versions-table-cell-draft">4.0.1</td>
|
||||||
|
<td class="versions-table-cell-release">4.6.0<span class="download-version-hash"><br/>9b829d9714</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>HAPI FHIR 5.3.0</td>
|
||||||
|
<td>JDK8</td>
|
||||||
|
<td class="versions-table-cell-empty"></td>
|
||||||
|
<td class="versions-table-cell-draft">1.0.2</td>
|
||||||
|
<td class="versions-table-cell-release">1.4.0</td>
|
||||||
|
<td class="versions-table-cell-draft">3.0.2</td>
|
||||||
|
<td class="versions-table-cell-draft">4.0.1</td>
|
||||||
|
<td class="versions-table-cell-release">4.5.0<span class="download-version-hash"><br/>6cd0af3b8c</span></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HAPI FHIR 5.2.0</td>
|
<td>HAPI FHIR 5.2.0</td>
|
||||||
<td>JDK8</td>
|
<td>JDK8</td>
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConcurrentTransactionCreates() throws ExecutionException, InterruptedException {
|
public void testConcurrentTransactionCreates() {
|
||||||
myDaoConfig.setMatchUrlCache(true);
|
myDaoConfig.setMatchUrlCache(true);
|
||||||
|
|
||||||
AtomicInteger counter = new AtomicInteger(0);
|
AtomicInteger counter = new AtomicInteger(0);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -75,7 +75,12 @@
|
||||||
<version>${fhir_core_version}</version>
|
<version>${fhir_core_version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<groupId>org.fhir</groupId>
|
||||||
|
<artifactId>ucum</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||||
<artifactId>caffeine</artifactId>
|
<artifactId>caffeine</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -666,63 +666,63 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public static VersionSpecificWorkerContextWrapper newVersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport) {
|
public static VersionSpecificWorkerContextWrapper newVersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport) {
|
||||||
IVersionTypeConverter converter;
|
IVersionTypeConverter converter;
|
||||||
|
|
||||||
switch (theValidationSupport.getFhirContext().getVersion().getVersion()) {
|
switch (theValidationSupport.getFhirContext().getVersion().getVersion()) {
|
||||||
case DSTU2:
|
case DSTU2:
|
||||||
case DSTU2_HL7ORG: {
|
case DSTU2_HL7ORG: {
|
||||||
converter = new IVersionTypeConverter() {
|
converter = new IVersionTypeConverter() {
|
||||||
@Override
|
@Override
|
||||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||||
Resource retVal = VersionConvertor_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical);
|
Resource retVal = VersionConvertor_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical);
|
||||||
if (theNonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) {
|
if (theNonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) {
|
||||||
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theNonCanonical;
|
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theNonCanonical;
|
||||||
if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) {
|
if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) {
|
||||||
if (!valueSet.hasCompose()) {
|
if (!valueSet.hasCompose()) {
|
||||||
ValueSet valueSetR5 = (ValueSet) retVal;
|
ValueSet valueSetR5 = (ValueSet) retVal;
|
||||||
valueSetR5.getCompose().addInclude().setSystem(valueSet.getCodeSystem().getSystem());
|
valueSetR5.getCompose().addInclude().setSystem(valueSet.getCodeSystem().getSystem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBaseResource fromCanonical(Resource theCanonical) {
|
public IBaseResource fromCanonical(Resource theCanonical) {
|
||||||
return VersionConvertor_10_50.convertResource(theCanonical);
|
return VersionConvertor_10_50.convertResource(theCanonical);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case DSTU2_1: {
|
case DSTU2_1: {
|
||||||
converter = new VersionTypeConverterDstu21();
|
converter = new VersionTypeConverterDstu21();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case DSTU3: {
|
case DSTU3: {
|
||||||
converter = new VersionTypeConverterDstu3();
|
converter = new VersionTypeConverterDstu3();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case R4: {
|
case R4: {
|
||||||
converter = new VersionTypeConverterR4();
|
converter = new VersionTypeConverterR4();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case R5: {
|
case R5: {
|
||||||
converter = IDENTITY_VERSION_TYPE_CONVERTER;
|
converter = IDENTITY_VERSION_TYPE_CONVERTER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new VersionSpecificWorkerContextWrapper(new ValidationSupportContext(theValidationSupport), converter);
|
return new VersionSpecificWorkerContextWrapper(new ValidationSupportContext(theValidationSupport), converter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -212,21 +212,21 @@ public class ResourceMinimizerMojo extends AbstractMojo {
|
||||||
// byteCount += m.getByteCount();
|
// byteCount += m.getByteCount();
|
||||||
// fileCount += m.getFileCount();
|
// fileCount += m.getFileCount();
|
||||||
|
|
||||||
m = new ResourceMinimizerMojo();
|
// m = new ResourceMinimizerMojo();
|
||||||
m.myCtx = ctxR4;
|
// m.myCtx = ctxR4;
|
||||||
m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile");
|
// m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile");
|
||||||
m.fhirVersion = "R4";
|
// m.fhirVersion = "R4";
|
||||||
m.execute();
|
// m.execute();
|
||||||
byteCount += m.getByteCount();
|
// byteCount += m.getByteCount();
|
||||||
fileCount += m.getFileCount();
|
// fileCount += m.getFileCount();
|
||||||
|
//
|
||||||
m = new ResourceMinimizerMojo();
|
// m = new ResourceMinimizerMojo();
|
||||||
m.myCtx = ctxR4;
|
// m.myCtx = ctxR4;
|
||||||
m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset");
|
// m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset");
|
||||||
m.fhirVersion = "R4";
|
// m.fhirVersion = "R4";
|
||||||
m.execute();
|
// m.execute();
|
||||||
byteCount += m.getByteCount();
|
// byteCount += m.getByteCount();
|
||||||
fileCount += m.getFileCount();
|
// fileCount += m.getFileCount();
|
||||||
|
|
||||||
m = new ResourceMinimizerMojo();
|
m = new ResourceMinimizerMojo();
|
||||||
m.myCtx = ctxR5;
|
m.myCtx = ctxR5;
|
||||||
|
|
Loading…
Reference in New Issue