From 026d57394ca23c6420d13ba62eb2ad3224c845aa Mon Sep 17 00:00:00 2001 From: James Agnew Date: Thu, 24 Oct 2024 17:22:27 -0400 Subject: [PATCH] Test fix --- .../ca/uhn/fhir/jpa/dao/r5/CrossPartitionReferencesTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/dao/r5/CrossPartitionReferencesTest.java b/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/dao/r5/CrossPartitionReferencesTest.java index 6430839184a..2719deb84a5 100644 --- a/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/dao/r5/CrossPartitionReferencesTest.java +++ b/hapi-fhir-jpaserver-test-r5/src/test/java/ca/uhn/fhir/jpa/dao/r5/CrossPartitionReferencesTest.java @@ -190,7 +190,7 @@ public class CrossPartitionReferencesTest extends BaseJpaR5Test { } private void initializeCrossReferencesInterceptor() { - when(myCrossPartitionReferencesDetectedInterceptor.handle(any(),any())).thenAnswer(t->{ + when(myCrossPartitionReferencesDetectedInterceptor.handle(any(), any())).thenAnswer(t -> { CrossPartitionReferenceDetails theDetails = t.getArgument(1, CrossPartitionReferenceDetails.class); IIdType targetId = theDetails.getPathAndRef().getRef().getReferenceElement(); RequestPartitionId referenceTargetPartition = myPartitionHelperSvc.determineReadPartitionForRequestForRead(theDetails.getRequestDetails(), targetId.getResourceType(), targetId); @@ -232,11 +232,12 @@ public class CrossPartitionReferencesTest extends BaseJpaR5Test { private static RequestPartitionId selectPartition(String resourceType) { switch (resourceType) { case "Patient": + case "RelatedPerson": return PARTITION_PATIENT; case "Observation": return PARTITION_OBSERVATION; default: - throw new InternalErrorException("Don't know how to handle resource type"); + throw new InternalErrorException("Don't know how to handle resource type: " + resourceType); } }