Test fixes
This commit is contained in:
parent
57c6064d89
commit
f252cda126
|
@ -829,7 +829,7 @@ public class SearchBuilder implements ISearchBuilder {
|
|||
return addPredicateString(theResourceName,
|
||||
theParamName,
|
||||
theList,
|
||||
SearchFilterParser.CompareOperation.eq);
|
||||
SearchFilterParser.CompareOperation.sw);
|
||||
}
|
||||
|
||||
private Predicate addPredicateString(String theResourceName,
|
||||
|
|
|
@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
|
|||
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
|
||||
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
||||
import net.ttddyy.dsproxy.listener.SingleQueryCountHolder;
|
||||
import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel;
|
||||
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
|
||||
import org.apache.commons.dbcp2.BasicDataSource;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
|
@ -106,9 +107,10 @@ public class TestR4Config extends BaseJavaConfigR4 {
|
|||
retVal.setPassword("");
|
||||
retVal.setMaxTotal(ourMaxThreads);
|
||||
|
||||
SLF4JLogLevel level = SLF4JLogLevel.INFO;
|
||||
DataSource dataSource = ProxyDataSourceBuilder
|
||||
.create(retVal)
|
||||
// .logQueryBySlf4j(SLF4JLogLevel.INFO, "SQL")
|
||||
.logQueryBySlf4j(level, "SQL")
|
||||
// .logSlowQueryBySlf4j(10, TimeUnit.SECONDS)
|
||||
// .countQuery(new ThreadQueryCountHolder())
|
||||
.beforeQuery(new BlockLargeNumbersOfParamsListener())
|
||||
|
|
|
@ -710,7 +710,6 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
|
|||
|
||||
@Test
|
||||
public void testCreateLongString() {
|
||||
//@formatter:off
|
||||
String input = "<NamingSystem>\n" +
|
||||
" <name value=\"NDF-RT (National Drug File – Reference Terminology)\"/>\n" +
|
||||
" <status value=\"draft\"/>\n" +
|
||||
|
@ -728,12 +727,13 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
|
|||
" <preferred value=\"false\"/>\n" +
|
||||
" </uniqueId>\n" +
|
||||
" </NamingSystem>";
|
||||
//@formatter:on
|
||||
|
||||
NamingSystem res = myFhirCtx.newXmlParser().parseResource(NamingSystem.class, input);
|
||||
IIdType id = myNamingSystemDao.create(res, mySrd).getId().toUnqualifiedVersionless();
|
||||
|
||||
assertThat(toUnqualifiedVersionlessIdValues(myNamingSystemDao.search(new SearchParameterMap(NamingSystem.SP_NAME, new StringParam("NDF")).setLoadSynchronous(true))), org.hamcrest.Matchers.contains(id.getValue()));
|
||||
SearchParameterMap params = new SearchParameterMap(NamingSystem.SP_NAME, new StringParam("NDF")).setLoadSynchronous(true);
|
||||
IBundleProvider result = myNamingSystemDao.search(params);
|
||||
assertThat(toUnqualifiedVersionlessIdValues(result), org.hamcrest.Matchers.contains(id.getValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue