From 4ef7e0341726fa58ea496bacd1e46cc2062ce591 Mon Sep 17 00:00:00 2001
From: James
Date: Thu, 28 Sep 2017 06:36:37 -0400
Subject: [PATCH] Give tests a bit more memory
---
hapi-fhir-structures-dstu2/pom.xml | 2 +-
.../ca/uhn/fhir/tinder/ExamineTestTrace.java | 8 +-
src/changes/changes.xml | 51 +++++--
src/site/xdoc/index.xml | 126 ++++++++++++++++--
4 files changed, 166 insertions(+), 21 deletions(-)
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 4a23a6db906..1c89198a3cf 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -208,7 +208,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- -Dfile.encoding=UTF-8 -Xmx712m
+ -Dfile.encoding=UTF-8 -Xmx1024m
diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ExamineTestTrace.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ExamineTestTrace.java
index 944531e2029..4a1e9a74555 100644
--- a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ExamineTestTrace.java
+++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/tinder/ExamineTestTrace.java
@@ -7,13 +7,15 @@ import org.slf4j.LoggerFactory;
import java.util.HashSet;
import java.util.Set;
+import static org.apache.commons.lang3.StringUtils.isBlank;
+
public class ExamineTestTrace {
private static final Logger ourLog = LoggerFactory.getLogger(ExamineTestTrace.class);
public static void main(String[] aaa) {
- String input = "Running ca.uhn.fhir.jpa.config.IdentifierLengthTest\n" +
- "Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.913 sec - in ca.uhn.fhir.jpa.subscription.r4.RestHookTestWithInterceptorRegisteredToDaoConfigR4Test";
+ String input = "Running ca.uhn.fhir.model.primitive.BaseResourceReferenceDtTest\n" +
+ "Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.896 sec - in ca.uhn.fhir.rest.server.OperationServerWithSearchParamTypesDstu2Test";
Set started = new HashSet<>();
Set finished = new HashSet<>();
@@ -22,6 +24,8 @@ public class ExamineTestTrace {
started.add(next.substring("Running ".length()));
} else if (next.startsWith("Tests run: ")) {
finished.add(next.substring(next.indexOf(" - in ") + " - in ".length()));
+ } else if (isBlank(next)) {
+ continue;
} else {
throw new IllegalStateException();
}
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a18d922fe27..6db2ea51114 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -1,5 +1,5 @@
-
James Agnew
@@ -16,14 +16,14 @@
DSTU1 FHIR version was a difficult decision, but it allows us the
opportunitity to clean up the codebase quite a bit, and remove some
confusing legacy parts of the API (such as the legacy Atom Bundle class).
-
>]]>
+
]]>
A new redesigned table of HAPI FHIR versions to FHIR version support has been
added to the Download Page]]>
HAPI FHIR's modules have been restructured for more consistency and less coupling
between unrelated parts of the API.
-
>]]>
+
]]>
A new complete list of HAPI FHIR modules has been added to the
Download Page]]>. Key changes
include:
@@ -46,7 +46,13 @@
a special Android JAR which contains the client, server (which added space but was
not used) and structures. There is now a normal module called hapi-fhir-android
which is added to your Android Gradle file along with whatever structures JARs you
- wish to add.
+ wish to add. See the
+ Android Integration Test
+ to see a sample project using HAPI FHIR 3.0.0. Note that this has been reported to
+ work by some people but others are having issues with it! In order to avoid delaying
+ this release any further we are releasing now despite these issues. If you are an Android
+ guru and want to help iron things out please get in touch. If not, it might be a good
+ idea to stay on HAPI FHIR 2.5 until the next point release of the 3.x series.
A new JAR containing FHIR utilities called hapi-fhir-utilities
has been
@@ -59,9 +65,17 @@
]]>
- A number of
+ In order to allow the reoganizations and decoupling above to happen, a number of important classes
+ and interfaces have been moved to new packages. A sample list of these changes is listed
+ below. When upgrading to 3.0.0 your project may well show a number of compile errors
+ related to missing classes. In most cases this can be resolved by simply removing the HAPI
+ imports from your classes and asking your IDE to "Organize Imports" once again. This is an
+ annoying change we do realize, but it is neccesary in order to allow the project to
+ continue to grow.
+ IGenericClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
+ IRestfulClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
AddProfileTagEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
IVersionSpecificBundleFactory moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
BundleInclusionRule moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
@@ -69,14 +83,35 @@
EncodingEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
Constants moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
IClientInterceptor moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
- IGenericClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
- IRestfulClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
ITestingUiClientFactory moved from package ca.uhn.fhir.util to package ca.uhn.fhir.rest.server.util
]]>
- Bump the version of a few dependencies to the
+ Because the Atom-based DSTU1 Bundle class has been removed from the library, users of the
+ HAPI FHIR client must now always include a Bundle return type in search calls. For example,
+ the following call would have worked previously:
+
+Bundle bundle = client.search().forResource(Patient.class)
+ .where(new TokenClientParam("gender").exactly().code("unknown"))
+ .prettyPrint()
+ .execute();
+
+ ]]>
+ This now needs an explicit returnBundle statement, as follows:
+
+Bundle bundle = client.search().forResource(Patient.class)
+ .where(new TokenClientParam("gender").exactly().code("unknown"))
+ .prettyPrint()
+ .returnBundle(Bundle.class)
+ .execute();
+
+ ]]>
+
+
+ The version of a few dependencies have been bumped to the
latest versions (dependent HAPI modules listed in brackets):
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index ac8b07ae36a..ba19775369f 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -75,19 +75,125 @@
GitHub's releases section.
- This release brings number of bugfixes and improvements. Most importantly
- for many users, this release brings a significant performance enhacement
- to the JPA server for searches. Essentially our search module has been
- rewritten to stream results back to the client as soon as they
- become available, and to reuse previous cached search results for a period of time.
- This cacheing behaviour in the JPA server is important to consider,
- since it does mean that your clients can see stale search results for
- a short period of time under some circumstances. The default cache period
- is 1 minute, but this can be changed or even disabled through configuration.
+ This is a massive release, and includes a huge number of enhancements,
+ fixes, and new features. Unfotunately it also brings a few breaking API changes
+ so we are calling it version 3.0.0 (we are also moving to SemVer versioning).
As always, the changelog has the full list
- of changes in this release. Thanks to everyone who contributed to this release, either
+ of changes in this release. I am outlining a few of the important ones here:
+
+ FHIR R4 and DSTU1 Support
+
+ Support for FHIR R4 (current working draft) has been added
+ (in a new module called hapi-fhir-structures-r4
)
+ and
+ support for FHIR DSTU1 (hapi-fhir-structures-dstu
)
+ has been removed. Removing support for the legacy
+ DSTU1 FHIR version was a difficult decision, but it allows us the
+ opportunitity to clean up the codebase quite a bit, and remove some
+ confusing legacy parts of the API (such as the legacy Atom Bundle class).
+
+ A new redesigned table of HAPI FHIR versions to FHIR version support has been
+ added to the Download Page
+
+ Module Restructuring
+
+ HAPI FHIR's modules have been restructured for more consistency and less coupling
+ between unrelated parts of the API.
+
+ A new complete list of HAPI FHIR modules has been added to the
+ Download Page. Key changes
+ include:
+
+
+ -
+ HAPI FHIR's client codebase has been moved out of
hapi-fhir-base
+ and in to a new module called hapi-fhir-client
. Client users now need
+ to explicitly add this JAR to their project (and non-client users now no longer
+ need to depend on it)
+
+ -
+ HAPI FHIR's server codebase has been moved out of
hapi-fhir-base
+ and in to a new module called hapi-fhir-server
. Server users now need
+ to explicitly add this JAR to their project (and non-server users now no longer
+ need to depend on it)
+
+ -
+ As a result of the client and server changes above, we no longer need to produce
+ a special Android JAR which contains the client, server (which added space but was
+ not used) and structures. There is now a normal module called
hapi-fhir-android
+ which is added to your Android Gradle file along with whatever structures JARs you
+ wish to add. See the
+ Android Integration Test
+ to see a sample project using HAPI FHIR 3.0.0. Note that this has been reported to
+ work by some people but others are having issues with it! In order to avoid delaying
+ this release any further we are releasing now despite these issues. If you are an Android
+ guru and want to help iron things out please get in touch. If not, it might be a good
+ idea to stay on HAPI FHIR 2.5 until the next point release of the 3.x series.
+
+ -
+ A new JAR containing FHIR utilities called
hapi-fhir-utilities
has been
+ added. This JAR reflects the ongoing harmonization between HAPI FHIR and the FHIR
+ RI codebases and is generally required in order to use HAPI at this point (if you
+ are using a dependency manager such as Maven or Gradle it will be brought in to your
+ project automatically as a dependency)
+
+
+
+
+ Package Changes
+
+ In order to allow the reoganizations and decoupling above to happen, a number of important classes
+ and interfaces have been moved to new packages. A sample list of these changes is listed
+ below. When upgrading to 3.0.0 your project may well show a number of compile errors
+ related to missing classes. In most cases this can be resolved by simply removing the HAPI
+ imports from your classes and asking your IDE to "Organize Imports" once again. This is an
+ annoying change we do realize, but it is neccesary in order to allow the project to
+ continue to grow.
+
+
+ - IGenericClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
+ - IRestfulClient moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
+ - AddProfileTagEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
+ - IVersionSpecificBundleFactory moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
+ - BundleInclusionRule moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.context.api
+ - RestSearchParameterTypeEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
+ - EncodingEnum moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
+ - Constants moved from package ca.uhn.fhir.rest.server to package ca.uhn.fhir.rest.api
+ - IClientInterceptor moved from package ca.uhn.fhir.rest.client to package ca.uhn.fhir.rest.client.api
+ - ITestingUiClientFactory moved from package ca.uhn.fhir.util to package ca.uhn.fhir.rest.server.util
+
+
+
+ Fluent Client Search Change
+
+ Because the Atom-based DSTU1 Bundle class has been removed from the library, users of the
+ HAPI FHIR client must now always include a Bundle return type in search calls. For example,
+ the following call would have worked previously:
+
+
+Bundle bundle = client.search().forResource(Patient.class)
+ .where(new TokenClientParam("gender").exactly().code("unknown"))
+ .prettyPrint()
+ .execute();
+
+
+ This now needs an explicit returnBundle statement, as follows:
+
+
+Bundle bundle = client.search().forResource(Patient.class)
+ .where(new TokenClientParam("gender").exactly().code("unknown"))
+ .prettyPrint()
+ .returnBundle(Bundle.class)
+ .execute();
+
+
+
+
+
+
+ Thanks to everyone who contributed to this release, either
by submitting pull requests, suggesting new features, or filing bug requests!