From 995c188305b7223baceefaa8780f4be65df066ef Mon Sep 17 00:00:00 2001 From: Tadgh Date: Sat, 1 Aug 2020 13:03:37 -0700 Subject: [PATCH] implement function for all concrete classe --- .../search/SearchCoordinatorSvcImplTest.java | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java index 7a52bd64de6..1b74f6647f1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/SearchCoordinatorSvcImplTest.java @@ -13,7 +13,6 @@ import ca.uhn.fhir.jpa.dao.SearchBuilder; import ca.uhn.fhir.jpa.dao.SearchBuilderFactory; import ca.uhn.fhir.jpa.entity.Search; import ca.uhn.fhir.jpa.entity.SearchTypeEnum; -import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.jpa.model.search.SearchStatusEnum; import ca.uhn.fhir.jpa.partition.IRequestPartitionHelperSvc; import ca.uhn.fhir.jpa.search.cache.ISearchCacheSvc; @@ -24,12 +23,11 @@ import ca.uhn.fhir.model.dstu2.resource.Patient; import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; +import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId; import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException; -import ca.uhn.fhir.util.TestUtil; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -668,6 +666,15 @@ public class SearchCoordinatorSvcImplTest { return myCount; } + @Override + public Collection getNextResultBatch(long theBatchSize) { + Collection batch = new ArrayList<>(); + while (this.hasNext() && batch.size() < theBatchSize) { + batch.add(this.next()); + } + return batch; + } + @Override public void close() { // nothing @@ -704,6 +711,15 @@ public class SearchCoordinatorSvcImplTest { return myCount; } + @Override + public Collection getNextResultBatch(long theBatchSize) { + Collection batch = new ArrayList<>(); + while (this.hasNext() && batch.size() < theBatchSize) { + batch.add(this.next()); + } + return batch; + } + @Override public void close() { // nothing @@ -775,6 +791,15 @@ public class SearchCoordinatorSvcImplTest { return 0; } + @Override + public Collection getNextResultBatch(long theBatchSize) { + Collection batch = new ArrayList<>(); + while (this.hasNext() && batch.size() < theBatchSize) { + batch.add(this.next()); + } + return batch; + } + @Override public void close() { // nothing