diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java index 044a59ff2cb..e8ebab619d3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnum.java @@ -36,8 +36,8 @@ public enum BundleEntryTransactionMethodEnum { GET("GET", "http://hl7.org/fhir/http-verb"), POST("POST", "http://hl7.org/fhir/http-verb"), PUT("PUT", "http://hl7.org/fhir/http-verb"), - DELETE("DELETE", "http://hl7.org/fhir/http-verb"), - ; + PATCH("PATCH", "http://hl7.org/fhir/http-verb"), + DELETE("DELETE", "http://hl7.org/fhir/http-verb"); /** * Identifier for this Value Set: diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnumTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnumTest.java new file mode 100644 index 00000000000..a92770099c1 --- /dev/null +++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/valueset/BundleEntryTransactionMethodEnumTest.java @@ -0,0 +1,26 @@ +package ca.uhn.fhir.model.valueset; + +import org.apache.jena.riot.web.HttpMethod; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class BundleEntryTransactionMethodEnumTest { + + /** + * HEAD is not supported either; but won't show up in transaction bundles + */ + @ParameterizedTest + @EnumSource(value = HttpMethod.class, + mode = EnumSource.Mode.EXCLUDE, + names = {"METHOD_TRACE", "METHOD_OPTIONS", "METHOD_QUERY", "METHOD_HEAD"} + ) + public void parseAllHTTPVerbs(HttpMethod theMethod) { + // test + BundleEntryTransactionMethodEnum val = BundleEntryTransactionMethodEnum.valueOf(theMethod.method()); + + // verify + assertEquals(theMethod.method(), val.getCode()); + } +} diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6058-added-support-for-patch-for-bundleentrymethods.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6058-added-support-for-patch-for-bundleentrymethods.yaml new file mode 100644 index 00000000000..cc547626aa3 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_4_0/6058-added-support-for-patch-for-bundleentrymethods.yaml @@ -0,0 +1,6 @@ +--- +type: fix +issue: 6058 +title: "Added `PATCH` operation to `BundleEntryTransactionMethodEnumTest` + in order to fully support transaction bundle operations. +" diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/Batch2JobHelper.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/Batch2JobHelper.java index 9ea101f1c39..6a6f933de24 100644 --- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/Batch2JobHelper.java +++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/Batch2JobHelper.java @@ -96,6 +96,7 @@ public class Batch2JobHelper { try { await() .atMost(theSecondsToWait, TimeUnit.SECONDS) + .pollDelay(100, TimeUnit.MILLISECONDS) .until(() -> { checkCount.getAndIncrement(); boolean inFinalStatus = false;