This commit is contained in:
leif stawnyczy 2023-08-15 10:50:19 -04:00
parent 478d7a1257
commit ab8b1ca277
2 changed files with 49 additions and 45 deletions

View File

@ -334,7 +334,7 @@ public class SearchTask implements Callable<Void> {
if (theResultIter.hasNext() == false) {
int skippedCount = theResultIter.getSkippedCount();
ourLog.info(
ourLog.trace(
"MaxToFetch[{}] SkippedCount[{}] CountSavedThisPass[{}] CountSavedThisTotal[{}] AdditionalPrefetchRemaining[{}]",
myMaxResultsToFetch,
skippedCount,

View File

@ -30,7 +30,6 @@ import java.util.Set;
import static org.hl7.fhir.instance.model.api.IBaseBundle.LINK_NEXT;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SuppressWarnings("Duplicates")
@ -101,7 +100,9 @@ public class PatientEverythingPaginationR4Test extends BaseResourceProviderR4Tes
@ValueSource(booleans = { true, false })
public void testEverythingPagination_LastPage(boolean theProvideCountBool) throws IOException {
// setup
List<Integer> prefetchThreshold = Arrays.asList(10, 50,-1);
List<Integer> previousPrefetchThreshold = myStorageSettings.getSearchPreFetchThresholds();
try {
List<Integer> prefetchThreshold = Arrays.asList(10, 50, -1);
myStorageSettings.setSearchPreFetchThresholds(prefetchThreshold);
// 3 pages @ 50
@ -151,9 +152,12 @@ public class PatientEverythingPaginationR4Test extends BaseResourceProviderR4Tes
assertEquals(4, patientsPage.size());
}
} while (nextUrl != null);
assertNull(nextUrl);
assertEquals(total, ids.size());
} finally {
// set it back, just in case
myStorageSettings.setSearchPreFetchThresholds(previousPrefetchThreshold);
}
}