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>
|
||||
</thead>
|
||||
<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>
|
||||
<td>HAPI FHIR 5.2.0</td>
|
||||
<td>JDK8</td>
|
||||
|
|
|
@ -77,7 +77,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testConcurrentTransactionCreates() throws ExecutionException, InterruptedException {
|
||||
public void testConcurrentTransactionCreates() {
|
||||
myDaoConfig.setMatchUrlCache(true);
|
||||
|
||||
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>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<dependency>
|
||||
<groupId>org.fhir</groupId>
|
||||
<artifactId>ucum</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
</dependency>
|
||||
|
|
|
@ -666,63 +666,63 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
return retVal;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static VersionSpecificWorkerContextWrapper newVersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport) {
|
||||
IVersionTypeConverter converter;
|
||||
@Nonnull
|
||||
public static VersionSpecificWorkerContextWrapper newVersionSpecificWorkerContextWrapper(IValidationSupport theValidationSupport) {
|
||||
IVersionTypeConverter converter;
|
||||
|
||||
switch (theValidationSupport.getFhirContext().getVersion().getVersion()) {
|
||||
case DSTU2:
|
||||
case DSTU2_HL7ORG: {
|
||||
converter = new IVersionTypeConverter() {
|
||||
@Override
|
||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||
Resource retVal = VersionConvertor_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical);
|
||||
if (theNonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) {
|
||||
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theNonCanonical;
|
||||
if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) {
|
||||
if (!valueSet.hasCompose()) {
|
||||
ValueSet valueSetR5 = (ValueSet) retVal;
|
||||
valueSetR5.getCompose().addInclude().setSystem(valueSet.getCodeSystem().getSystem());
|
||||
}
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
switch (theValidationSupport.getFhirContext().getVersion().getVersion()) {
|
||||
case DSTU2:
|
||||
case DSTU2_HL7ORG: {
|
||||
converter = new IVersionTypeConverter() {
|
||||
@Override
|
||||
public Resource toCanonical(IBaseResource theNonCanonical) {
|
||||
Resource retVal = VersionConvertor_10_50.convertResource((org.hl7.fhir.dstu2.model.Resource) theNonCanonical);
|
||||
if (theNonCanonical instanceof org.hl7.fhir.dstu2.model.ValueSet) {
|
||||
org.hl7.fhir.dstu2.model.ValueSet valueSet = (org.hl7.fhir.dstu2.model.ValueSet) theNonCanonical;
|
||||
if (valueSet.hasCodeSystem() && valueSet.getCodeSystem().hasSystem()) {
|
||||
if (!valueSet.hasCompose()) {
|
||||
ValueSet valueSetR5 = (ValueSet) retVal;
|
||||
valueSetR5.getCompose().addInclude().setSystem(valueSet.getCodeSystem().getSystem());
|
||||
}
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBaseResource fromCanonical(Resource theCanonical) {
|
||||
return VersionConvertor_10_50.convertResource(theCanonical);
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
@Override
|
||||
public IBaseResource fromCanonical(Resource theCanonical) {
|
||||
return VersionConvertor_10_50.convertResource(theCanonical);
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
case DSTU2_1: {
|
||||
converter = new VersionTypeConverterDstu21();
|
||||
break;
|
||||
}
|
||||
case DSTU2_1: {
|
||||
converter = new VersionTypeConverterDstu21();
|
||||
break;
|
||||
}
|
||||
|
||||
case DSTU3: {
|
||||
converter = new VersionTypeConverterDstu3();
|
||||
break;
|
||||
}
|
||||
case DSTU3: {
|
||||
converter = new VersionTypeConverterDstu3();
|
||||
break;
|
||||
}
|
||||
|
||||
case R4: {
|
||||
converter = new VersionTypeConverterR4();
|
||||
break;
|
||||
}
|
||||
case R4: {
|
||||
converter = new VersionTypeConverterR4();
|
||||
break;
|
||||
}
|
||||
|
||||
case R5: {
|
||||
converter = IDENTITY_VERSION_TYPE_CONVERTER;
|
||||
break;
|
||||
}
|
||||
case R5: {
|
||||
converter = IDENTITY_VERSION_TYPE_CONVERTER;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
default:
|
||||
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();
|
||||
// fileCount += m.getFileCount();
|
||||
|
||||
m = new ResourceMinimizerMojo();
|
||||
m.myCtx = ctxR4;
|
||||
m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile");
|
||||
m.fhirVersion = "R4";
|
||||
m.execute();
|
||||
byteCount += m.getByteCount();
|
||||
fileCount += m.getFileCount();
|
||||
|
||||
m = new ResourceMinimizerMojo();
|
||||
m.myCtx = ctxR4;
|
||||
m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset");
|
||||
m.fhirVersion = "R4";
|
||||
m.execute();
|
||||
byteCount += m.getByteCount();
|
||||
fileCount += m.getFileCount();
|
||||
// m = new ResourceMinimizerMojo();
|
||||
// m.myCtx = ctxR4;
|
||||
// m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/profile");
|
||||
// m.fhirVersion = "R4";
|
||||
// m.execute();
|
||||
// byteCount += m.getByteCount();
|
||||
// fileCount += m.getFileCount();
|
||||
//
|
||||
// m = new ResourceMinimizerMojo();
|
||||
// m.myCtx = ctxR4;
|
||||
// m.targetDirectory = new File("./hapi-fhir-validation-resources-r4/src/main/resources/org/hl7/fhir/r4/model/valueset");
|
||||
// m.fhirVersion = "R4";
|
||||
// m.execute();
|
||||
// byteCount += m.getByteCount();
|
||||
// fileCount += m.getFileCount();
|
||||
|
||||
m = new ResourceMinimizerMojo();
|
||||
m.myCtx = ctxR5;
|
||||
|
|
Loading…
Reference in New Issue