Disable user resource and weaken validation on the public server
This commit is contained in:
parent
e8139192e0
commit
7e83fc78cf
|
@ -132,7 +132,7 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 {
|
||||||
requestValidator.setFailOnSeverity(null);
|
requestValidator.setFailOnSeverity(null);
|
||||||
requestValidator.setAddResponseHeaderOnSeverity(null);
|
requestValidator.setAddResponseHeaderOnSeverity(null);
|
||||||
requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION);
|
requestValidator.setAddResponseOutcomeHeaderOnSeverity(ResultSeverityEnum.INFORMATION);
|
||||||
requestValidator.addValidatorModule(instanceValidatorDstu3());
|
// requestValidator.addValidatorModule(instanceValidatorDstu3());
|
||||||
requestValidator.setIgnoreValidatorExceptions(true);
|
requestValidator.setIgnoreValidatorExceptions(true);
|
||||||
|
|
||||||
return requestValidator;
|
return requestValidator;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
|
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
|
||||||
import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
|
import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
|
||||||
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
import ca.uhn.fhir.model.primitive.DateTimeDt;
|
||||||
|
import ca.uhn.fhir.util.StopWatch;
|
||||||
import ca.uhn.fhir.util.TestUtil;
|
import ca.uhn.fhir.util.TestUtil;
|
||||||
import ca.uhn.fhir.validation.FhirValidator;
|
import ca.uhn.fhir.validation.FhirValidator;
|
||||||
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
||||||
|
@ -30,6 +31,8 @@ import org.junit.runner.Description;
|
||||||
import org.mockito.invocation.InvocationOnMock;
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
import org.mockito.stubbing.Answer;
|
import org.mockito.stubbing.Answer;
|
||||||
|
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -67,6 +70,26 @@ public class FhirInstanceValidatorDstu3Test {
|
||||||
myValidConcepts.add(theSystem + "___" + theCode);
|
myValidConcepts.add(theSystem + "___" + theCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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
|
* See #873
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -92,7 +92,6 @@ resource.Substance=ca.uhn.fhir.model.dstu2.resource.Substance
|
||||||
resource.SupplyDelivery=ca.uhn.fhir.model.dstu2.resource.SupplyDelivery
|
resource.SupplyDelivery=ca.uhn.fhir.model.dstu2.resource.SupplyDelivery
|
||||||
resource.SupplyRequest=ca.uhn.fhir.model.dstu2.resource.SupplyRequest
|
resource.SupplyRequest=ca.uhn.fhir.model.dstu2.resource.SupplyRequest
|
||||||
resource.TestScript=ca.uhn.fhir.model.dstu2.resource.TestScript
|
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.ValueSet=ca.uhn.fhir.model.dstu2.resource.ValueSet
|
||||||
resource.VisionPrescription=ca.uhn.fhir.model.dstu2.resource.VisionPrescription
|
resource.VisionPrescription=ca.uhn.fhir.model.dstu2.resource.VisionPrescription
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue