more logs
This commit is contained in:
parent
ef4adda527
commit
c1dc342659
|
@ -1,7 +1,6 @@
|
||||||
package ca.uhn.fhir.jpa.provider.r4;
|
package ca.uhn.fhir.jpa.dao.r4;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.dao.r4.BaseJpaR4Test;
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
||||||
import ca.uhn.fhir.jpa.searchparam.ResourceSearch;
|
import ca.uhn.fhir.jpa.searchparam.ResourceSearch;
|
||||||
|
@ -27,9 +26,9 @@ import static org.hamcrest.Matchers.contains;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
|
||||||
public class ResourceProviderR4SearchTest extends BaseJpaR4Test {
|
public class ChainedContainedR4SearchTest extends BaseJpaR4Test {
|
||||||
|
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4SearchTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ChainedContainedR4SearchTest.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
MatchUrlService myMatchUrlService;
|
MatchUrlService myMatchUrlService;
|
|
@ -1,10 +1,10 @@
|
||||||
package ca.uhn.fhir.jpa.dao.r4;
|
package ca.uhn.fhir.jpa.dao.r4;
|
||||||
|
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
import ca.uhn.fhir.rest.api.SearchContainedModeEnum;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
||||||
import static org.junit.jupiter.api.Assertions.fail;
|
import ca.uhn.fhir.rest.param.ReferenceParam;
|
||||||
|
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
import org.hl7.fhir.r4.model.Address;
|
import org.hl7.fhir.r4.model.Address;
|
||||||
import org.hl7.fhir.r4.model.Address.AddressUse;
|
import org.hl7.fhir.r4.model.Address.AddressUse;
|
||||||
|
@ -26,15 +26,13 @@ import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import ca.uhn.fhir.rest.api.SearchContainedModeEnum;
|
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
|
||||||
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
|
||||||
import ca.uhn.fhir.rest.param.ReferenceParam;
|
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
|
||||||
|
|
||||||
import java.util.stream.Collector;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
|
import static org.hamcrest.Matchers.containsInAnyOrder;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.fail;
|
||||||
|
|
||||||
public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
|
public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4ContainedTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4ContainedTest.class);
|
||||||
|
|
||||||
|
@ -80,7 +78,6 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
|
||||||
map = new SearchParameterMap();
|
map = new SearchParameterMap();
|
||||||
map.add("subject", new ReferenceParam("name", "Smith"));
|
map.add("subject", new ReferenceParam("name", "Smith"));
|
||||||
map.setSearchContainedMode(SearchContainedModeEnum.TRUE);
|
map.setSearchContainedMode(SearchContainedModeEnum.TRUE);
|
||||||
|
|
||||||
assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id)));
|
assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,14 +107,16 @@ public class FhirResourceDaoR4ContainedTest extends BaseJpaR4Test {
|
||||||
.getSingleResult();
|
.getSingleResult();
|
||||||
assertEquals(1L, i.longValue());
|
assertEquals(1L, i.longValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
SearchParameterMap map;
|
SearchParameterMap map;
|
||||||
|
|
||||||
map = new SearchParameterMap();
|
map = new SearchParameterMap();
|
||||||
map.add("subject", new ReferenceParam("name", "Smith"));
|
map.add("subject", new ReferenceParam("name", "Smith"));
|
||||||
map.setSearchContainedMode(SearchContainedModeEnum.TRUE);
|
map.setSearchContainedMode(SearchContainedModeEnum.TRUE);
|
||||||
|
map.setLoadSynchronous(true);
|
||||||
|
myCaptureQueriesListener.clear();
|
||||||
assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id)));
|
assertThat(toUnqualifiedVersionlessIdValues(myObservationDao.search(map)), containsInAnyOrder(toValues(id)));
|
||||||
|
ourLog.info(">>> " + myCaptureQueriesListener.getSelectQueriesForCurrentThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue