diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java
index e916b0b7a92..3a5d5a9f189 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/Pointcut.java
@@ -1401,12 +1401,12 @@ public enum Pointcut {
*
*
*
- * Hooks should return an instance of ca.uhn.fhir.jpa.api.model.PartitionId
or null
.
+ * Hooks should return an instance of ca.uhn.fhir.jpa.api.model.RequestPartitionId
or null
.
*
*/
STORAGE_PARTITION_IDENTIFY_CREATE(
// Return type
- "ca.uhn.fhir.interceptor.model.PartitionId",
+ "ca.uhn.fhir.interceptor.model.RequestPartitionId",
// Params
"org.hl7.fhir.instance.model.api.IBaseResource",
"ca.uhn.fhir.rest.api.server.RequestDetails",
@@ -1440,12 +1440,12 @@ public enum Pointcut {
*
*
*
- * Hooks should return an instance of ca.uhn.fhir.jpa.api.model.PartitionId
or null
.
+ * Hooks should return an instance of ca.uhn.fhir.jpa.api.model.RequestPartitionId
or null
.
*
*/
STORAGE_PARTITION_IDENTIFY_READ(
// Return type
- "ca.uhn.fhir.interceptor.model.PartitionId",
+ "ca.uhn.fhir.interceptor.model.RequestPartitionId",
// Params
"ca.uhn.fhir.rest.api.server.RequestDetails",
"ca.uhn.fhir.rest.server.servlet.ServletRequestDetails"
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
index 6acaa93aa7c..49f9c9e18b8 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
@@ -282,7 +282,7 @@ public class IdHelperService {
}
}
- if (pid.isEmpty()) {
+ if (!pid.isPresent()) {
throw new ResourceNotFoundException(new IdDt(theResourceType, theId));
}
return pid.get();
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
index 09366f8158a..7fb585a7b4d 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java
@@ -7,6 +7,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoPatient;
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
import ca.uhn.fhir.jpa.config.TestDstu3Config;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
+import ca.uhn.fhir.jpa.dao.dstu3.BaseJpaDstu3Test;
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
import ca.uhn.test.concurrency.PointcutLatch;
import org.hl7.fhir.dstu3.model.Patient;
@@ -26,9 +27,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-@RunWith(SpringRunner.class)
-@ContextConfiguration(classes = {TestDstu3Config.class})
-public class ExpungeHookTest {
+public class ExpungeHookTest extends BaseJpaDstu3Test {
@Autowired
private IFhirResourceDaoPatient myPatientDao;
@Autowired
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java
index 52b6d6ef49a..b8ce8d63a72 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/SearchCoordinatorSvcImplTest.java
@@ -55,6 +55,11 @@ public class SearchCoordinatorSvcImplTest extends BaseJpaR4Test {
DatabaseSearchCacheSvcImpl.setMaximumResultsToDeleteInOnePassForUnitTest(5);
DatabaseSearchCacheSvcImpl.setMaximumSearchesToCheckForDeletionCandidacyForUnitTest(10);
+ runInTransaction(()->{
+ assertEquals(0, mySearchDao.count());
+ assertEquals(0, mySearchResultDao.count());
+ });
+
// Create lots of searches
runInTransaction(()->{
for (int i = 0; i < 20; i++) {