diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java index 7ae25455645..84f32331a81 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java @@ -132,7 +132,7 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { requestValidator.setFailOnSeverity(null); requestValidator.setAddResponseHeaderOnSeverity(null); requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION); - requestValidator.addValidatorModule(instanceValidatorDstu3()); +// requestValidator.addValidatorModule(instanceValidatorDstu3()); requestValidator.setIgnoreValidatorExceptions(true); return requestValidator; diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index 38bd6934ea6..7882eb46945 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.model.dstu2.composite.PeriodDt; import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum; import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.util.StopWatch; import ca.uhn.fhir.util.TestUtil; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.ResultSeverityEnum; @@ -30,6 +31,8 @@ import org.junit.runner.Description; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import java.io.FileNotFoundException; +import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.util.*; @@ -67,9 +70,29 @@ public class FhirInstanceValidatorDstu3Test { myValidConcepts.add(theSystem + "___" + theCode); } - /** - * See #873 - */ + @Test + public void testStress() throws IOException { + + String input = IOUtils.toString(new FileReader("/home/james/Downloads/history.json")); + + FhirValidator val = ourCtx.newValidator(); + val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport)); + + val.validateWithResult(input); + + StopWatch sw = new StopWatch(); + int loops = 100; + for (int i = 0; i < loops; i++) { + val.validateWithResult(input); + } + + ourLog.info("Validated {} times AVG {}ms/val", loops, sw.getMillisPerOperation(loops)); + } + + + /** + * See #873 + */ @Test public void testCompareTimesWithDifferentTimezones() { Procedure procedure = new Procedure(); diff --git a/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties index 5534dddc601..63891e1c877 100644 --- a/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties +++ b/hapi-tinder-plugin/src/main/resources/ca/uhn/fhir/model/dstu2/fhirversion.properties @@ -92,7 +92,6 @@ resource.Substance=ca.uhn.fhir.model.dstu2.resource.Substance resource.SupplyDelivery=ca.uhn.fhir.model.dstu2.resource.SupplyDelivery resource.SupplyRequest=ca.uhn.fhir.model.dstu2.resource.SupplyRequest resource.TestScript=ca.uhn.fhir.model.dstu2.resource.TestScript -resource.User=ca.uhn.fhir.model.dstu2.resource.User resource.ValueSet=ca.uhn.fhir.model.dstu2.resource.ValueSet resource.VisionPrescription=ca.uhn.fhir.model.dstu2.resource.VisionPrescription