From b64e982ec3a033c782fdff3fdc8a16d3ecec9176 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Wed, 16 Sep 2020 09:07:33 -0400 Subject: [PATCH] Credit for #2083 --- ...3-search-coordinator-threads-use-threadpoolexecutor.yaml | 6 ++++++ .../src/test/java/ca/uhn/fhir/jpa/packages/NpmTestR4.java | 1 + 2 files changed, 7 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_2_0/2083-search-coordinator-threads-use-threadpoolexecutor.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_2_0/2083-search-coordinator-threads-use-threadpoolexecutor.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_2_0/2083-search-coordinator-threads-use-threadpoolexecutor.yaml new file mode 100644 index 00000000000..81fcd2f1ec4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_2_0/2083-search-coordinator-threads-use-threadpoolexecutor.yaml @@ -0,0 +1,6 @@ +--- +type: add +issue: 2083 +title: "The JPA search coordinator will now use worker threads sourced from a ThreadPoolTaskExecutor, in order to simplify + the addition of decorators to those threads. Thanks to Tue Toft Nørgård for the pull requets!" + diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmTestR4.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmTestR4.java index dd09c8f92d8..d646765860b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmTestR4.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/NpmTestR4.java @@ -384,6 +384,7 @@ public class NpmTestR4 extends BaseJpaR4Test { PackageInstallationSpec spec = new PackageInstallationSpec().setName("hl7.fhir.uv.shorthand").setVersion("0.12.0").setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_ONLY); igInstaller.install(spec); + runInTransaction(() -> { NpmPackageVersionEntity versionEntity = myPackageVersionDao.findByPackageIdAndVersion("hl7.fhir.uv.shorthand", "0.12.0").orElseThrow(() -> new IllegalArgumentException()); assertEquals(true, versionEntity.isCurrentVersion());