Revert to JDK9 to build on travis temporarily

This commit is contained in:
James Agnew 2018-12-21 09:26:19 -05:00
parent 12b95deafb
commit 1311ef4157
2 changed files with 101 additions and 1 deletions

View File

@ -8,7 +8,8 @@ dist: trusty
language: java
jdk:
- openjdk11
- oraclejdk9
# - openjdk11
env:
global:
- MAVEN_OPTS="-Xmx10244M -Xss128M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=1024M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"

View File

@ -2772,6 +2772,105 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertThat(actual.getText().getDiv().getValueAsString(), containsString("<td>Identifier</td><td>testSearchByResourceChain01</td>"));
}
@Test
public void testTerminologyWithCompleteCs_Expand() throws Exception {
CodeSystem cs = new CodeSystem();
cs.setContent(CodeSystem.CodeSystemContentMode.COMPLETE);
cs.setUrl("http://cs");
CodeSystem.ConceptDefinitionComponent a = cs.addConcept()
.setCode("A");
a.addConcept().setCode("A1");
a.addConcept().setCode("A2");
CodeSystem.ConceptDefinitionComponent b = cs.addConcept()
.setCode("B");
b.addConcept().setCode("B1");
b.addConcept().setCode("B2");
ourClient.create().resource(cs).execute();
ValueSet vs = new ValueSet();
vs.setUrl("http://vs");
vs.getCompose()
.addInclude()
.setSystem("http://cs")
.addFilter()
.setProperty("concept")
.setOp(ValueSet.FilterOperator.ISA)
.setValue("A");
IIdType vsid = ourClient.create().resource(vs).execute().getId().toUnqualifiedVersionless();
HttpGet read = new HttpGet(ourServerBase + "/" + vsid.getValue() + "/$expand");
try (CloseableHttpResponse response = ourHttpClient.execute(read)) {
String text = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(text);
assertEquals(Constants.STATUS_HTTP_200_OK, response.getStatusLine().getStatusCode());
assertThat(text, containsString("\"A\""));
assertThat(text, containsString("\"A1\""));
assertThat(text, not(containsString("\"B\"")));
assertThat(text, not(containsString("\"B1\"")));
}
// HttpGet read = new HttpGet(ourServerBase + "/Observation?patient=P5000000302&_sort:desc=code&code:in=http://fkcfhir.org/fhir/vs/ccdacapddialysisorder");
// try (CloseableHttpResponse response = ourHttpClient.execute(read)) {
// String text = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
// ourLog.info(text);
// assertEquals(Constants.STATUS_HTTP_200_OK, response.getStatusLine().getStatusCode());
// assertThat(text, not(containsString("\"text\",\"type\"")));
// }
}
@Test
public void testTerminologyWithCompleteCs_SearchForConceptIn() throws Exception {
CodeSystem cs = new CodeSystem();
cs.setContent(CodeSystem.CodeSystemContentMode.COMPLETE);
cs.setUrl("http://cs");
CodeSystem.ConceptDefinitionComponent a = cs.addConcept()
.setCode("A");
a.addConcept().setCode("A1");
a.addConcept().setCode("A2");
CodeSystem.ConceptDefinitionComponent b = cs.addConcept()
.setCode("B");
b.addConcept().setCode("B1");
b.addConcept().setCode("B2");
ourClient.create().resource(cs).execute();
ValueSet vs = new ValueSet();
vs.setUrl("http://vs");
vs.getCompose()
.addInclude()
.setSystem("http://cs")
.addFilter()
.setProperty("concept")
.setOp(ValueSet.FilterOperator.ISA)
.setValue("A");
ourClient.create().resource(vs).execute().getId().toUnqualifiedVersionless();
Observation obs = new Observation();
obs.getCode().addCoding().setSystem("http://cs").setCode("A1");
obs.setValue(new StringType("OBS1"));
obs.setStatus(ObservationStatus.FINAL);
ourClient.create().resource(obs).execute();
Observation obs2 = new Observation();
obs2.getCode().addCoding().setSystem("http://cs").setCode("B1");
obs2.setStatus(ObservationStatus.FINAL);
obs2.setValue(new StringType("OBS2"));
ourClient.create().resource(obs2).execute();
HttpGet read = new HttpGet(ourServerBase + "/Observation?code:in=http://vs");
try (CloseableHttpResponse response = ourHttpClient.execute(read)) {
String text = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
ourLog.info(text);
assertEquals(Constants.STATUS_HTTP_200_OK, response.getStatusLine().getStatusCode());
assertThat(text, containsString("\"OBS1\""));
assertThat(text, not(containsString("\"OBS2\"")));
}
}
@Test
public void testSearchBundleDoesntIncludeTextElement() throws Exception {
HttpGet read = new HttpGet(ourServerBase + "/Patient?_format=json");