Bump ES version

This commit is contained in:
Tadgh
2022-05-16 14:26:52 -07:00
parent cd0b8d7392
commit ffd0cb1a4f

View File

@@ -43,6 +43,7 @@ import org.testcontainers.elasticsearch.ElasticsearchContainer;
"hapi.fhir.fhir_version=r4", "hapi.fhir.fhir_version=r4",
"hapi.fhir.lastn_enabled=true", "hapi.fhir.lastn_enabled=true",
"hapi.fhir.store_resource_in_lucene_index_enabled=true", "hapi.fhir.store_resource_in_lucene_index_enabled=true",
"hapi.fhir.advanced_lucene_indexing=true",
"elasticsearch.enabled=true", "elasticsearch.enabled=true",
// Because the port is set randomly, we will set the rest_url using the Initializer. // Because the port is set randomly, we will set the rest_url using the Initializer.
// "elasticsearch.rest_url='http://localhost:9200'", // "elasticsearch.rest_url='http://localhost:9200'",
@@ -57,9 +58,8 @@ public class ElasticsearchLastNR4IT {
private IGenericClient ourClient; private IGenericClient ourClient;
private FhirContext ourCtx; private FhirContext ourCtx;
private static final String ELASTIC_VERSION = "7.10.2"; private static final String ELASTIC_VERSION = "7.16.3";
private static final String ELASTIC_IMAGE = "docker.elastic.co/elasticsearch/elasticsearch:" + ELASTIC_VERSION; private static final String ELASTIC_IMAGE = "docker.elastic.co/elasticsearch/elasticsearch:" + ELASTIC_VERSION;
private static ElasticsearchContainer embeddedElastic; private static ElasticsearchContainer embeddedElastic;
@Autowired @Autowired
@@ -90,8 +90,10 @@ public class ElasticsearchLastNR4IT {
obs.getSubject().setReferenceElement(id); obs.getSubject().setReferenceElement(id);
String observationCode = "testobservationcode"; String observationCode = "testobservationcode";
String codeSystem = "http://testobservationcodesystem"; String codeSystem = "http://testobservationcodesystem";
obs.getCode().addCoding().setCode(observationCode).setSystem(codeSystem); obs.getCode().addCoding().setCode(observationCode).setSystem(codeSystem);
obs.setValue(new StringType(observationCode)); obs.setValue(new StringType(observationCode));
Date effectiveDtm = new GregorianCalendar().getTime(); Date effectiveDtm = new GregorianCalendar().getTime();
obs.setEffective(new DateTimeType(effectiveDtm)); obs.setEffective(new DateTimeType(effectiveDtm));
obs.getCategoryFirstRep().addCoding().setCode("testcategorycode").setSystem("http://testcategorycodesystem"); obs.getCategoryFirstRep().addCoding().setCode("testcategorycode").setSystem("http://testcategorycodesystem");
@@ -103,6 +105,7 @@ public class ElasticsearchLastNR4IT {
.withParameter(Parameters.class, "max", new IntegerType(1)) .withParameter(Parameters.class, "max", new IntegerType(1))
.andParameter("subject", new StringType("Patient/" + id.getIdPart())) .andParameter("subject", new StringType("Patient/" + id.getIdPart()))
.execute(); .execute();
Bundle b = (Bundle) output.getParameter().get(0).getResource(); Bundle b = (Bundle) output.getParameter().get(0).getResource();
assertEquals(1, b.getTotal()); assertEquals(1, b.getTotal());
assertEquals(obsId, b.getEntry().get(0).getResource().getIdElement().toUnqualifiedVersionless()); assertEquals(obsId, b.getEntry().get(0).getResource().getIdElement().toUnqualifiedVersionless());