diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java index 441de7433ee..45b9d107d25 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java @@ -537,6 +537,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { @Test public void testIndexNoDuplicatesUri() { ValueSet res = new ValueSet(); + res.setUrl("http://www.example.org/vs"); res.getCompose().addInclude().setSystem("http://foo"); res.getCompose().addInclude().setSystem("http://bar"); res.getCompose().addInclude().setSystem("http://foo"); @@ -549,7 +550,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { Class type = ResourceIndexedSearchParamUri.class; List results = myEntityManager.createQuery("SELECT i FROM " + type.getSimpleName() + " i WHERE i.myMissing = false", type).getResultList(); ourLog.info(toStringMultiline(results)); - assertEquals(2, results.size()); + assertEquals(3, results.size()); List actual = toUnqualifiedVersionlessIds(myValueSetDao.search(new SearchParameterMap().setLoadSynchronous(true).add(ValueSet.SP_REFERENCE, new UriParam("http://foo")))); assertThat(actual, contains(id)); @@ -2161,13 +2162,14 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test { } @Test - public void testSearchUriWrongParam() throws Exception { + public void testSearchUriWrongParam() { ValueSet v1 = new ValueSet(); v1.getUrlElement().setValue("http://foo"); String id1 = myValueSetDao.create(v1).getId().toUnqualifiedVersionless().getValue(); ValueSet v2 = new ValueSet(); v2.getExpansion().getIdentifierElement().setValue("http://foo"); + v2.getUrlElement().setValue("http://www.example.org/vs"); String id2 = myValueSetDao.create(v2).getId().toUnqualifiedVersionless().getValue(); { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java index 46c25066285..834526e728f 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java @@ -914,6 +914,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { @Test public void testIndexNoDuplicatesUri() { ValueSet res = new ValueSet(); + res.setUrl("http://www.example.org/vs"); res.getCompose().addInclude().setSystem("http://foo"); res.getCompose().addInclude().setSystem("http://bar"); res.getCompose().addInclude().setSystem("http://foo"); @@ -927,7 +928,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { Class type = ResourceIndexedSearchParamUri.class; List results = myEntityManager.createQuery("SELECT i FROM " + type.getSimpleName() + " i WHERE i.myMissing = false", type).getResultList(); ourLog.info(toStringMultiline(results)); - assertEquals(2, results.size()); + assertEquals(3, results.size()); }); List actual = toUnqualifiedVersionlessIds(myValueSetDao.search(new SearchParameterMap().setLoadSynchronous(true).add(ValueSet.SP_REFERENCE, new UriParam("http://foo")))); @@ -2944,6 +2945,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test { ValueSet v2 = new ValueSet(); v2.getExpansion().getIdentifierElement().setValue("http://foo"); + v2.getUrlElement().setValue("http://www.example.org/vs"); String id2 = myValueSetDao.create(v2).getId().toUnqualifiedVersionless().getValue(); { diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java index d38c66269b5..638c19de59e 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java @@ -772,6 +772,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { @Test public void testIndexNoDuplicatesUri() { ValueSet res = new ValueSet(); + res.setUrl("http://www.example.org/vs"); res.getCompose().addInclude().setSystem("http://foo"); res.getCompose().addInclude().setSystem("http://bar"); res.getCompose().addInclude().setSystem("http://foo"); @@ -785,7 +786,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test { Class type = ResourceIndexedSearchParamUri.class; List results = myEntityManager.createQuery("SELECT i FROM " + type.getSimpleName() + " i WHERE i.myMissing = false", type).getResultList(); ourLog.info(toStringMultiline(results)); - assertEquals(2, results.size()); + assertEquals(3, results.size()); }); List actual = toUnqualifiedVersionlessIds(myValueSetDao.search(new SearchParameterMap().setLoadSynchronous(true).add(ValueSet.SP_REFERENCE, new UriParam("http://foo")))); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java index 235920d2517..c07d8e9e48c 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java @@ -3919,7 +3919,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { .returnBundle(Bundle.class) .execute(); final String uuid2 = toSearchUuidFromLinkNext(result2); - assertNotEquals(uuid1, uuid2); // TODO: DM 2019-09-24 - This test fails intermittently; I suspect it's a timing issue with sleepOneClick(); + assertNotEquals(uuid1, uuid2); // TODO: DM 2019-09-24 - This assertion fails intermittently. } /*