diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 201e445a4a99..51c5425eca68 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 13909dbc16af..feaca8b7da19 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 088a0759e7f7..2fde11f09f16 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 91eb20984d7a..bf725a7f316a 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -4,7 +4,7 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
pom
HAPI FHIR BOM
@@ -12,7 +12,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index 1d5ac23a2860..3697c4a748b1 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index 84d516e1c15f..7c64eb14bdc1 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ReindexTerminologyCommandTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ReindexTerminologyCommandTest.java
index 81c0a079f7a3..53f39fdf7a69 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ReindexTerminologyCommandTest.java
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ReindexTerminologyCommandTest.java
@@ -6,8 +6,8 @@
import ca.uhn.fhir.test.utilities.RestServerR4Helper;
import ca.uhn.fhir.test.utilities.TlsAuthenticationTestHelper;
import ca.uhn.fhir.util.ParametersUtil;
-import ca.uhn.test.util.LogEventIterableAssert;
import ca.uhn.test.util.LogbackTestExtension;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import ch.qos.logback.classic.Logger;
import org.hl7.fhir.instance.model.api.IBaseParameters;
import org.junit.jupiter.api.BeforeEach;
@@ -30,6 +30,7 @@
@ExtendWith(MockitoExtension.class)
class ReindexTerminologyCommandTest {
+ private static final String FAILURE_MESSAGE = "FAILURE";
private final FhirContext myContext = FhirContext.forR4();
@Spy
@@ -68,10 +69,9 @@ public void testProviderMethodInvoked(boolean theIncludeTls) {
);
runAppWithStartupHook(args, getLoggingStartupHook());
- LogEventIterableAssert.assertThat(myAppLogCapture.getLogEvents()).hasNoFailureMessages();
+ LogbackTestExtensionAssert.assertThat(myAppLogCapture).doesNotHaveMessage(FAILURE_MESSAGE);
}
-
@ParameterizedTest
@ValueSource(booleans = {true, false})
public void testNoVersionThrows(boolean theIncludeTls) {
@@ -131,8 +131,9 @@ public void testHandleUnexpectedResponse(boolean theIncludeTls) {
);
runAppWithStartupHook(args, getLoggingStartupHook());
- LogEventIterableAssert.assertThat(myAppLogCapture.getLogEvents()).hasAtLeastOneFailureMessage();
- LogEventIterableAssert.assertThat(myAppLogCapture.getLogEvents()).hasAtLeastOneEventWithMessage("Internal error. Command result unknown. Check system logs for details");
+ LogbackTestExtensionAssert.assertThat(myAppLogCapture)
+ .hasMessage(FAILURE_MESSAGE)
+ .hasMessage("Internal error. Command result unknown. Check system logs for details");
}
@ParameterizedTest
@@ -155,8 +156,9 @@ public void testHandleServiceError(boolean theIncludeTls) {
);
runAppWithStartupHook(args, getLoggingStartupHook());
- LogEventIterableAssert.assertThat(myAppLogCapture.getLogEvents()).hasAtLeastOneFailureMessage();
- LogEventIterableAssert.assertThat(myAppLogCapture.getLogEvents()).hasAtLeastOneEventWithMessage("Freetext service is not configured. Operation didn't run.");
+ LogbackTestExtensionAssert.assertThat(myAppLogCapture)
+ .hasMessage(FAILURE_MESSAGE)
+ .hasMessage("Freetext service is not configured. Operation didn't run.");
}
static void runAppWithStartupHook(String[] args, Consumer startupHook) {
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index f8ad950f61a3..8e941cb0a0e8 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index 3e5e320ae337..21639b13dbd2 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index 7e51b799115f..c1830ea0cd6f 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 50c733543811..0af38c9fe65d 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index eddec160b6d6..2654c2950d2d 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index ac9a6e400cb4..b99f36c00bab 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index 7799c4a2bee3..6e055f475f0f 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 82a2c6633b53..ebbf76b2a9e9 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 69bffab63ad0..e03ab0b9c8e6 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index d49ec2ac0f92..dd2407995465 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 2a9f0b2cdf8b..794bb2dc7fcf 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
index ca2c9dcea708..702c664e8bec 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java b/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
index bf0b3b9b45d0..3ee1dd89aaf0 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
@@ -27,9 +27,7 @@
import ca.uhn.fhir.jpa.search.CompositeSearchParameterTestCases;
import ca.uhn.fhir.jpa.search.QuantitySearchParameterTestCases;
import ca.uhn.fhir.jpa.search.builder.SearchBuilder;
-import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
-import ca.uhn.fhir.jpa.search.lastn.json.ObservationJson;
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
@@ -60,17 +58,11 @@
import ca.uhn.fhir.validation.FhirValidator;
import ca.uhn.fhir.validation.ValidationResult;
import ca.uhn.test.util.LogbackTestExtension;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import co.elastic.clients.elasticsearch.ElasticsearchClient;
-import co.elastic.clients.elasticsearch.core.SearchRequest;
-import co.elastic.clients.elasticsearch.core.SearchResponse;
-import com.fasterxml.jackson.databind.node.ObjectNode;
import jakarta.annotation.Nonnull;
-import jakarta.json.JsonValue;
import jakarta.persistence.EntityManager;
import org.apache.commons.lang3.RandomStringUtils;
-import org.elasticsearch.client.RequestOptions;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
@@ -282,7 +274,7 @@ public void restoreContains() {
class ElasticPerformanceTracingInterceptor {
- private List messages = new ArrayList<>();
+ private final List messages = new ArrayList<>();
@Hook(Pointcut.JPA_PERFTRACE_INFO)
public void logPerformance(StorageProcessingMessage theMessage) {
@@ -955,9 +947,7 @@ public void testDirectPathWholeResourceNotIndexedWorks() {
assertThat(result).hasSize(1);
assertEquals(((Observation) result.get(0)).getIdElement().getIdPart(), id1.getIdPart());
- List events = myLogbackTestExtension.filterLoggingEventsWithPredicate(e -> e.getLevel() == Level.WARN);
- assertFalse(events.isEmpty());
- assertTrue(events.stream().anyMatch(e -> e.getFormattedMessage().contains("Some resources were not found in index. Make sure all resources were indexed. Resorting to database search.")));
+ LogbackTestExtensionAssert.assertThat(myLogbackTestExtension).hasWarnMessage("Some resources were not found in index. Make sure all resources were indexed. Resorting to database search.");
// restore changed property
JpaStorageSettings defaultConfig = new JpaStorageSettings();
@@ -1766,7 +1756,7 @@ public void tagSourceSearch() {
public class LastUpdatedTests {
private String myOldObsId, myNewObsId;
- private String myOldLastUpdatedDateTime = "2017-03-24T03:21:47";
+ private final String myOldLastUpdatedDateTime = "2017-03-24T03:21:47";
@BeforeEach
public void enableResourceStorage() {
diff --git a/hapi-fhir-jpaserver-hfql/pom.xml b/hapi-fhir-jpaserver-hfql/pom.xml
index 9583fdb476e7..3eff499cc707 100644
--- a/hapi-fhir-jpaserver-hfql/pom.xml
+++ b/hapi-fhir-jpaserver-hfql/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-ips/pom.xml b/hapi-fhir-jpaserver-ips/pom.xml
index 4f67baddc2a0..cfbd59eb7b92 100644
--- a/hapi-fhir-jpaserver-ips/pom.xml
+++ b/hapi-fhir-jpaserver-ips/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index 9597e5a5336a..ab4e4387aebb 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 8aac2c786846..54a5a4d85a5b 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index e80a8be7df3d..17e2ad77faa5 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index ce7be44c49ce..a05e3b6e0601 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java
index 3661691d5834..b386603f203e 100644
--- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java
+++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionLoaderTest.java
@@ -13,9 +13,8 @@
import ca.uhn.fhir.rest.server.SimpleBundleProvider;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import ca.uhn.fhir.subscription.SubscriptionConstants;
-import ca.uhn.test.util.LogEventIterableAssert;
import ca.uhn.test.util.LogbackTestExtension;
-import ch.qos.logback.classic.Level;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.r4.model.Subscription;
import org.junit.jupiter.api.BeforeEach;
@@ -125,10 +124,8 @@ public void syncSubscriptions_withInactiveSubscriptionFailing_Syncs() {
verify(mySubscriptionDao)
.searchForResources(any(SearchParameterMap.class), any(SystemRequestDetails.class));
- String expected = "Subscription "
- + subscription.getIdElement().getIdPart()
- + " could not be activated.";
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.ERROR, expected);
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasAtLeastOneEventWithMessage(subscription.getError());
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasErrorMessage(
+ "Subscription " + subscription.getIdElement().getIdPart() + " could not be activated.");
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasMessage(subscription.getError());
}
}
diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml
index 0481251547ff..f376488440b7 100644
--- a/hapi-fhir-jpaserver-test-dstu2/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml
index 24cd5461796d..f58a0362a488 100644
--- a/hapi-fhir-jpaserver-test-dstu3/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml
index ff76c82b8e4a..47298899f9a4 100644
--- a/hapi-fhir-jpaserver-test-r4/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java
index 1597b816beac..65eb5737e2b0 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ValidateTest.java
@@ -32,8 +32,8 @@
import ca.uhn.fhir.util.OperationOutcomeUtil;
import ca.uhn.fhir.util.StopWatch;
import ca.uhn.fhir.validation.IValidatorModule;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.spi.ILoggingEvent;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.common.hapi.validation.support.InMemoryTerminologyServerValidationSupport;
import org.hl7.fhir.common.hapi.validation.support.UnknownCodeSystemWarningValidationSupport;
@@ -103,6 +103,7 @@
import static org.hl7.fhir.common.hapi.validation.support.ValidationConstants.LOINC_LOW;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
@@ -1514,7 +1515,7 @@ public void validateResource_withUnknownMetaProfileurl_validatesButLogsWarning()
// validator
assertNotNull(outcome);
- assertTrue(outcome.getOperationOutcome() instanceof OperationOutcome);
+ assertInstanceOf(OperationOutcome.class, outcome.getOperationOutcome());
List issues = ((OperationOutcome) outcome.getOperationOutcome()).getIssue();
assertFalse(issues.isEmpty());
List errors = issues.stream()
@@ -1523,12 +1524,7 @@ public void validateResource_withUnknownMetaProfileurl_validatesButLogsWarning()
// we have errors
assertFalse(errors.isEmpty());
- List events = myLogbackTestExtension.filterLoggingEventsWithPredicate(e -> {
- return e.getLevel() == Level.WARN;
- });
- // and we have warning logs
- assertFalse(events.isEmpty());
- assertTrue(events.stream().anyMatch(e -> e.getFormattedMessage().contains("Unrecognized profile uri")));
+ LogbackTestExtensionAssert.assertThat(myLogbackTestExtension).hasWarnMessage("Unrecognized profile uri");
}
@Test
@@ -1654,7 +1650,7 @@ public void validateResource_withMetaProfileWithVersion_validatesAsExpected() {
// verify
assertNotNull(outcome);
- assertTrue(outcome.getOperationOutcome() instanceof OperationOutcome);
+ assertInstanceOf(OperationOutcome.class, outcome.getOperationOutcome());
List issues = ((OperationOutcome) outcome.getOperationOutcome()).getIssue();
assertFalse(issues.isEmpty());
List errors = issues.stream()
diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml
index 8a7495daaf16..818c701136fc 100644
--- a/hapi-fhir-jpaserver-test-r4b/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml
index 259a64936490..608fdd505543 100644
--- a/hapi-fhir-jpaserver-test-r5/pom.xml
+++ b/hapi-fhir-jpaserver-test-r5/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index db997edc3df0..c2ec846dc4af 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/auth/FhirQueryRuleImplTest.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/auth/FhirQueryRuleImplTest.java
index e88b6fcb6451..3f3188baa85d 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/auth/FhirQueryRuleImplTest.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/auth/FhirQueryRuleImplTest.java
@@ -12,9 +12,8 @@
import ca.uhn.fhir.rest.server.interceptor.auth.PolicyEnum;
import ca.uhn.fhir.rest.server.interceptor.auth.RuleBuilder;
import ca.uhn.fhir.test.utilities.ITestDataBuilder;
-import ca.uhn.test.util.LogEventIterableAssert;
import ca.uhn.test.util.LogbackTestExtension;
-import ch.qos.logback.classic.Level;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import jakarta.annotation.Nullable;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
@@ -272,7 +271,7 @@ public void givenAllowRule_whenUnsupportedQuery_noVerdict() {
// then
assertNull(verdict);
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.WARN, "unsupported chain XXX");
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasWarnMessage("unsupported chain XXX");
}
@Test
@@ -287,7 +286,7 @@ public void givenDenyRule_whenUnsupportedQuery_reject() {
// then
assertEquals(PolicyEnum.DENY, verdict.getDecision());
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.WARN, "unsupported chain XXX");
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasWarnMessage("unsupported chain XXX");
}
/**
@@ -306,7 +305,7 @@ public void noMatcherService_unsupportedPerm_noVerdict() {
// then
assertNull(verdict);
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.WARN, "No matcher provided");
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasWarnMessage("No matcher provided");
}
}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 71d885240977..2bf177376a4b 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-server-cds-hooks/pom.xml b/hapi-fhir-server-cds-hooks/pom.xml
index 7f61bbb7962e..580d759866a7 100644
--- a/hapi-fhir-server-cds-hooks/pom.xml
+++ b/hapi-fhir-server-cds-hooks/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceCacheTest.java b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceCacheTest.java
index a42e4c186ba4..a9cdbcfb82bc 100644
--- a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceCacheTest.java
+++ b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceCacheTest.java
@@ -5,8 +5,8 @@
import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson;
import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseCardJson;
import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseJson;
-import ca.uhn.test.util.LogEventIterableAssert;
import ca.uhn.test.util.LogbackTestExtension;
+import ca.uhn.test.util.LogbackTestExtensionAssert;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import jakarta.annotation.Nonnull;
@@ -68,7 +68,7 @@ void registerDynamicServiceShouldNotRegisterServiceWhenServiceAlreadyRegistered(
assertTrue(cdsMethod.isAllowAutoFhirClientPrefetch());
assertThat(myFixture.myCdsServiceJson.getServices()).hasSize(1);
assertEquals(cdsServiceJson, myFixture.myCdsServiceJson.getServices().get(0));
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.ERROR, expectedLogMessage);
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasErrorMessage(expectedLogMessage);
}
@@ -96,7 +96,7 @@ void unregisterServiceMethodShouldReturnNullWhenServiceNotRegistered() {
final ICdsMethod actual = myFixture.unregisterServiceMethod(TEST_KEY, MODULE_ID);
// validate
assertNull(actual);
- LogEventIterableAssert.assertThat(myLogCapture.getLogEvents()).hasEventWithLevelAndMessageContains(Level.ERROR, expectedLogMessage);
+ LogbackTestExtensionAssert.assertThat(myLogCapture).hasErrorMessage(expectedLogMessage);
}
@Nonnull
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 80b9e0ed656b..8933befbe65d 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index 24024f4d4e2d..39bf63f2e15f 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index a34c76f9c436..2960b6c699ba 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
index cad1eb5cb207..4ad27d29228a 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
index 64375e7cb853..4ccbb5543e1b 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
@@ -21,7 +21,7 @@
ca.uhn.hapi.fhir
hapi-fhir-caching-api
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
index 70f721728a7d..2fced0308fa3 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
index 896cade4e242..9b85a596aa17 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir
ca.uhn.hapi.fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../pom.xml
diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml
index a36e8af164bb..b0750d335d23 100644
--- a/hapi-fhir-serviceloaders/pom.xml
+++ b/hapi-fhir-serviceloaders/pom.xml
@@ -5,7 +5,7 @@
hapi-deployable-pom
ca.uhn.hapi.fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index eba034a3f1aa..df1576799655 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index f56394509da1..6affbba2e142 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index a9a5f761a80d..d6eb50c50a8f 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index 659495404257..1ccc2bfd27e0 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 91a9520acc45..92edf4d9b147 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index 74ecebfb13ae..b869d30105be 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 7549eb1eb833..7380b3e795ed 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index 7df21c64a592..db4594ee68f9 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml
index 56b010918f48..6c0307fb1b8e 100644
--- a/hapi-fhir-storage-batch2-jobs/pom.xml
+++ b/hapi-fhir-storage-batch2-jobs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml
index 93ea4cf7b13a..9d33165b068a 100644
--- a/hapi-fhir-storage-batch2-test-utilities/pom.xml
+++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index eb6613d9a1aa..db6a81ee6a03 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml
index 9b14b5502d72..291bae091444 100644
--- a/hapi-fhir-storage-cr/pom.xml
+++ b/hapi-fhir-storage-cr/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index 6bb660531751..d07296717fe6 100644
--- a/hapi-fhir-storage-mdm/pom.xml
+++ b/hapi-fhir-storage-mdm/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 661e8891445a..b6ec7f3a55cb 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index e34bca707bbe..fd25eed90a9f 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 770444fa1a12..fc267dcddf41 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 0c8a4fb83028..57b6e8045bb9 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/provider/ObservableSupplierSetTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/provider/ObservableSupplierSetTest.java
index 45b78682a9f5..d39609a9bda5 100644
--- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/provider/ObservableSupplierSetTest.java
+++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/provider/ObservableSupplierSetTest.java
@@ -13,6 +13,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
+import static ca.uhn.test.util.LoggingEventPredicates.makeMessageContains;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -56,7 +57,7 @@ public void testRemoveWrongSupplier() {
myObservableSupplierSet.removeSupplier(myCounter::incrementAndGet);
myObserver.assertCalls(1, 0);
assertThat(myObservableSupplierSet.getSupplierResults()).hasSize(1);
- List events = myLogger.filterLoggingEventsWithMessageContaining("Failed to remove supplier");
+ List events = myLogger.getLogEvents(makeMessageContains("Failed to remove supplier"));
assertThat(events).hasSize(1);
assertEquals(Level.WARN, events.get(0).getLevel());
}
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index 9037e3bc7043..a24986cae097 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index 0d01ca0e479d..461133b93245 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 06498f459033..add2380e321a 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml
index bb63b81f9567..ff544d60169d 100644
--- a/hapi-fhir-structures-r4b/pom.xml
+++ b/hapi-fhir-structures-r4b/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 8c2d63471719..7aafb2d11aea 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index 1faf8ccee8a6..c9cedb6ead88 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventAssert.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventAssert.java
deleted file mode 100644
index 6dd8bdfce7c6..000000000000
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventAssert.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*-
- * #%L
- * HAPI FHIR Test Utilities
- * %%
- * Copyright (C) 2014 - 2024 Smile CDR, Inc.
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-package ca.uhn.test.util;
-
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import org.assertj.core.api.AbstractAssert;
-
-public class LogEventAssert extends AbstractAssert {
-
- protected LogEventAssert(ILoggingEvent actual) {
- super(actual, LogEventAssert.class);
- }
-}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventIterableAssert.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventIterableAssert.java
deleted file mode 100644
index 40a3ecacfbd0..000000000000
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogEventIterableAssert.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*-
- * #%L
- * HAPI FHIR Test Utilities
- * %%
- * Copyright (C) 2014 - 2024 Smile CDR, Inc.
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-package ca.uhn.test.util;
-
-import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import jakarta.annotation.Nonnull;
-import org.assertj.core.api.AbstractIterableAssert;
-
-import java.util.Collection;
-
-public class LogEventIterableAssert extends AbstractIterableAssert, ILoggingEvent, LogEventAssert> {
-
- protected LogEventIterableAssert(Collection actual) {
- super(actual, LogEventIterableAssert.class);
- }
-
- public static LogEventIterableAssert assertThat(Collection actual) {
- return new LogEventIterableAssert(actual);
- }
-
- public LogEventIterableAssert hasNoFailureMessages() {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .map(ILoggingEvent::getMessage)
- .noneMatch(message -> message.contains("FAILURE")),
- "LogEvents should not contain messages with 'FAILURE'");
- return this;
- }
-
- public LogEventIterableAssert hasEventWithLevelAndMessageContains(@Nonnull Level theLevel, @Nonnull String thePartialMessage) {
- isNotNull();
- matches(logEvents -> logEvents.stream()
- .anyMatch(event-> event.getFormattedMessage().contains(thePartialMessage) &&
- event.getLevel().isGreaterOrEqual(theLevel)),
- "Log Events should have at least one message with `"+theLevel.levelStr+"` in it.");
- return this;
- }
- public LogEventIterableAssert hasAtLeastOneFailureMessage() {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .map(ILoggingEvent::getMessage)
- .anyMatch(message -> message.contains("FAILURE")),
- "Log Events should have at least one message with `FAILURE` in it.");
- return this;
- }
-
- public LogEventIterableAssert hasAtLeastOneEventWithMessage(String thePartial) {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .map(ILoggingEvent::getFormattedMessage)
- .anyMatch(message -> message.contains(thePartial)),
- "Log Events should have at least one message with "+ thePartial + " in it.");
- return this;
- }
-
- @Override
- protected LogEventAssert toAssert(ILoggingEvent value, String description) {
- return new LogEventAssert(value).as(description);
- }
-
- @Override
- protected LogEventIterableAssert newAbstractIterableAssert(Iterable extends ILoggingEvent> iterable) {
- return new LogEventIterableAssert((Collection) iterable);
- }
-
- public LogEventIterableAssert doesNotHaveEventWithMessage(String thePartial) {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .map(ILoggingEvent::getFormattedMessage)
- .noneMatch(message -> message.contains(thePartial)),
- "Log Events should have no message with "+ thePartial + " in it.");
- return this;
- }
-
- public LogEventIterableAssert hasEventWithLevelAndMessageAndThrew(Level theLevel, String thePartial, String theExceptionMessage) {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .filter(message -> message.getMessage().contains(thePartial))
- .filter(message -> message.getLevel() == theLevel)
- .anyMatch(message -> message.getThrowableProxy().getMessage().contains(theExceptionMessage)),
- "Log Events should have at least one message with "+ thePartial + " in it.");
-
- return this;
- }
-
- public LogEventIterableAssert doesNotHaveEventWithLevelAndMessage(Level theLevel, String thePartial) {
- isNotNull();
-
- matches(logEvents -> logEvents.stream()
- .filter(e -> e.getLevel() == theLevel)
- .map(ILoggingEvent::getFormattedMessage)
- .noneMatch(message -> message.contains(thePartial)),
- "Log Events should have no " + theLevel.toString() + " message with "+ thePartial + " in it.");
- return this;
- }
-}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackEventAssert.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackEventAssert.java
deleted file mode 100644
index e91ce2e0189f..000000000000
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackEventAssert.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * #%L
- * HAPI FHIR Test Utilities
- * %%
- * Copyright (C) 2014 - 2024 Smile CDR, Inc.
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-package ca.uhn.test.util;
-
-import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import jakarta.annotation.Nullable;
-import org.assertj.core.api.AbstractAssert;
-
-/**
- * An assertj matcher for junit assertions.
- * Matches on level, partial message, and/or a portion of the message contained by a throwable, if present.
- */
-public class LogbackEventAssert extends AbstractAssert {
- @Nullable
- private final Level myLevel;
- @Nullable
- private final String myLogMessage;
- @Nullable
- private final String myThrownMessage;
-
- public LogbackEventAssert(@Nullable Level theLevel, @Nullable String thePartialString) {
- this(theLevel, thePartialString, null);
- }
-
- public LogbackEventAssert(@Nullable Level theLevel, @Nullable String thePartialString, @Nullable String theThrownMessage) {
- super(null, LogbackEventAssert.class);
- myLevel = theLevel;
- myLogMessage = thePartialString;
- myThrownMessage = theThrownMessage;
- }
-
- public static LogbackEventAssert assertThat(@Nullable Level theLevel, @Nullable String thePartialString) {
- return new LogbackEventAssert(theLevel, thePartialString);
- }
-
- public static LogbackEventAssert assertThat(@Nullable Level theLevel, @Nullable String thePartialString, @Nullable String theThrownMessage) {
- return new LogbackEventAssert(theLevel, thePartialString, theThrownMessage);
- }
-
- public LogbackEventAssert matches(ILoggingEvent item) {
- isNotNull();
-
- if (myLevel != null && !item.getLevel().isGreaterOrEqual(myLevel)) {
- failWithMessage("Expected level to be at least <%s> but was <%s>", myLevel, item.getLevel());
- }
-
- if (myLogMessage != null && !item.getFormattedMessage().contains(myLogMessage)) {
- failWithMessage("Expected log message to contain <%s> but was <%s>", myLogMessage, item.getFormattedMessage());
- }
-
- if (myThrownMessage != null && (item.getThrowableProxy() == null || !item.getThrowableProxy().getMessage().contains(myThrownMessage))) {
- failWithMessage("Expected throwable message to contain <%s> but was <%s>", myThrownMessage, item.getThrowableProxy() != null ? item.getThrowableProxy().getMessage() : "null");
- }
-
- return this;
- }
-}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtension.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtension.java
index 6afd1362e0db..40ae0c21d6ad 100644
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtension.java
+++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtension.java
@@ -32,9 +32,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
-import java.util.stream.Collectors;
-
-import static org.assertj.core.api.Assertions.assertThat;
/**
* Test helper to collect logback lines.
@@ -80,7 +77,11 @@ public LogbackTestExtension(org.slf4j.Logger theLogger) {
this((Logger) theLogger);
}
- public java.util.List getLogEvents() {
+ /**
+ * Returns a copy to avoid concurrent modification errors.
+ * @return A copy of the log events so far.
+ */
+ public List getLogEvents() {
return new ArrayList<>(myListAppender.list);
}
@@ -120,37 +121,13 @@ public void afterEach(ExtensionContext context) throws Exception {
}
}
- public List filterLoggingEventsWithMessageEqualTo(String theMessageText) {
- return filterLoggingEventsWithPredicate(loggingEvent -> loggingEvent.getFormattedMessage().equals(theMessageText));
- }
-
- public List filterLoggingEventsWithMessageContaining(String theMessageText) {
- return filterLoggingEventsWithPredicate(loggingEvent -> loggingEvent.getFormattedMessage().contains(theMessageText));
- }
-
- public List filterLoggingEventsWithPredicate(Predicate theLoggingEventPredicate) {
- return getLogEvents().stream().filter(theLoggingEventPredicate).collect(Collectors.toList());
+ public List getLogEvents(Predicate thePredicate) {
+ return getLogEvents().stream().filter(thePredicate).toList();
}
@Nonnull
public List getLogMessages() {
- return getLogEvents().stream().map(ILoggingEvent::getMessage).collect(Collectors.toList());
- }
-
- public static void assertEventWithLevelAndMessageContains(List events, @Nonnull Level theLevel, @Nonnull String thePartialMessage) {
- assertThat(events).anySatisfy(event -> LogbackEventAssert.assertThat(theLevel, thePartialMessage).matches(event));
- }
-
- public static void assertEventWithLevel(List events, @Nonnull Level theLevel) {
- assertThat(events).anySatisfy(event -> LogbackEventAssert.assertThat(theLevel, null).matches(event));
+ return getLogEvents().stream().map(ILoggingEvent::getMessage).toList();
}
- public static void assertEventWithMessageContains(List events, @Nonnull String thePartialMessage) {
- assertThat(events).anySatisfy(event -> LogbackEventAssert.assertThat(null, thePartialMessage).matches(event));
- }
-
- public static void assertEventWithLevelAndMessageAndThrew(List events, @Nonnull Level theLevel,
- @Nonnull String thePartialMessage, @Nonnull String theThrown) {
- assertThat(events).anySatisfy(event -> LogbackEventAssert.assertThat(theLevel, thePartialMessage, theThrown).matches(event));
- }
}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtensionAssert.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtensionAssert.java
index ef18a3200b7a..0c4162265c7a 100644
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtensionAssert.java
+++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LogbackTestExtensionAssert.java
@@ -19,7 +19,16 @@
import java.util.List;
import java.util.function.Predicate;
+import static ca.uhn.test.util.LoggingEventPredicates.makeAnyMatch;
+import static ca.uhn.test.util.LoggingEventPredicates.makeLevelEquals;
+import static ca.uhn.test.util.LoggingEventPredicates.makeMessageContains;
+
+
public class LogbackTestExtensionAssert extends AbstractAssert {
+
+ private static final String HAS_ERROR_MSG_1 = "has logging message with message containing %s";
+ private static final String HAS_ERROR_MSG_2 = "has logging message with level %s and message containing %s";
+
@Nonnull
public static LogbackTestExtensionAssert assertThat(@Nonnull LogbackTestExtension theLogbackTestExtension) {
return new LogbackTestExtensionAssert(theLogbackTestExtension, LogbackTestExtensionAssert.class);
@@ -29,21 +38,93 @@ private LogbackTestExtensionAssert(LogbackTestExtension theLogbackTestExtension,
super(theLogbackTestExtension, selfType);
}
+ /**
+ * Verifies that messages contains exactly the given values and nothing else, in order.
+ */
+ @Nonnull
+ public LogbackTestExtensionAssert containsExactMessages(@Nonnull String ... theMessages) {
+ isNotNull();
+ Assertions.assertThat(actual.getLogMessages()).containsExactly(theMessages);
+ return this;
+ }
+
+ @Nonnull
+ public LogbackTestExtensionAssert hasMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeMessageContains(theMessage);
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_1, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).has(condition);
+ return this;
+ }
+
+ public LogbackTestExtensionAssert doesNotHaveMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeMessageContains(theMessage);
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_1, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).doesNotHave(condition);
+ return this;
+ }
+
+ @Nonnull
+ public LogbackTestExtensionAssert hasErrorMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeLevelEquals(Level.ERROR)
+ .and(makeMessageContains(theMessage));
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_2, Level.ERROR, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).has(condition);
+ return this;
+ }
+
+ @Nonnull
+ public LogbackTestExtensionAssert hasInfoMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeLevelEquals(Level.INFO)
+ .and(makeMessageContains(theMessage));
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_2, Level.INFO, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).has(condition);
+ return this;
+ }
+
+ @Nonnull
+ public LogbackTestExtensionAssert doesNotHaveInfoMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeLevelEquals(Level.INFO).and(makeMessageContains(theMessage));
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_2, Level.INFO, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).doesNotHave(condition);
+ return this;
+ }
+
@Nonnull
- public LogbackTestExtensionAssert hasError(@Nonnull String theMessage) {
- Assertions.assertThat(actual.getLogEvents()).has(eventWithLevelAndMessageContains(Level.ERROR, theMessage));
+ public LogbackTestExtensionAssert hasWarnMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeLevelEquals(Level.WARN)
+ .and(makeMessageContains(theMessage));
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_2, Level.WARN, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).has(condition);
return this;
}
@Nonnull
- public LogbackTestExtensionAssert hasInfo(@Nonnull String theMessage) {
- Assertions.assertThat(actual.getLogEvents()).has(eventWithLevelAndMessageContains(Level.INFO, theMessage));
+ public LogbackTestExtensionAssert hasDebugMessage(@Nonnull String theMessage) {
+ isNotNull();
+ final Predicate predicate = makeLevelEquals(Level.DEBUG)
+ .and(makeMessageContains(theMessage));
+ final Condition> condition =
+ new Condition<>(makeAnyMatch(predicate), HAS_ERROR_MSG_2, Level.DEBUG, theMessage);
+ Assertions.assertThat(actual.getLogEvents()).has(condition);
return this;
}
@Nonnull
- public LogbackTestExtensionAssert hasDebug(@Nonnull String theMessage) {
- Assertions.assertThat(actual.getLogEvents()).has(eventWithLevelAndMessageContains(Level.DEBUG, theMessage));
+ public LogbackTestExtensionAssert anyMatch(@Nonnull Predicate thePredicate) {
+ isNotNull();
+ Assertions.assertThat(actual.getLogEvents()).anyMatch(thePredicate);
return this;
}
@@ -54,12 +135,17 @@ public LogbackTestExtensionAssert isEmpty() {
}
@Nonnull
- private Condition super List extends ILoggingEvent>> eventWithLevelAndMessageContains(@Nonnull Level theLevel, @Nonnull String theExpected) {
- final Predicate loggingEvent = theLoggingEvent ->
- theLoggingEvent.getLevel().equals(theLevel) && theLoggingEvent.getFormattedMessage().contains(theExpected);
- final Predicate> loggingEvents = theLoggingEvents ->
- theLoggingEvents.stream().anyMatch(loggingEvent);
- return new Condition<>(loggingEvents, "has error logging message with level %s and message containing %s", theLevel, theExpected);
+ public LogbackTestExtensionAssert isNotEmpty() {
+ isNotNull();
+ Assertions.assertThat(actual.getLogEvents()).isNotEmpty();
+ return this;
+ }
+
+ @Nonnull
+ public LogbackTestExtensionAssert hasSize(int theExpected) {
+ isNotNull();
+ Assertions.assertThat(actual.getLogEvents()).hasSize(theExpected);
+ return this;
}
}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LoggingEventPredicates.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LoggingEventPredicates.java
new file mode 100644
index 000000000000..a5e742b7a494
--- /dev/null
+++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/LoggingEventPredicates.java
@@ -0,0 +1,58 @@
+/*-
+ * #%L
+ * HAPI FHIR Test Utilities
+ * %%
+ * Copyright (C) 2014 - 2024 Smile CDR, Inc.
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+package ca.uhn.test.util;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import jakarta.annotation.Nonnull;
+
+import java.util.List;
+import java.util.function.Predicate;
+
+public final class LoggingEventPredicates {
+ private LoggingEventPredicates() {
+ }
+
+ @Nonnull
+ public static Predicate makeLevelEquals(@Nonnull Level theLevel) {
+ return loggingEvent -> loggingEvent.getLevel().equals(theLevel);
+ }
+
+ @Nonnull
+ public static Predicate makeMessageEquals(@Nonnull String theMessage) {
+ return loggingEvent -> loggingEvent.getFormattedMessage().equals(theMessage);
+ }
+
+ @Nonnull
+ public static Predicate makeMessageContains(@Nonnull String theMessage) {
+ return loggingEvent -> loggingEvent.getFormattedMessage().contains(theMessage);
+ }
+
+ @Nonnull
+ public static Predicate makeExceptionMessageContains(@Nonnull String theExceptionMessage) {
+ return loggingEvent -> loggingEvent.getThrowableProxy().getMessage().contains(theExceptionMessage);
+ }
+
+ @Nonnull
+ public static Predicate> makeAnyMatch(@Nonnull Predicate thePredicate) {
+ return loggingEvents -> loggingEvents.stream().anyMatch(thePredicate);
+ }
+
+}
diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/StaticLogbackTestExtension.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/StaticLogbackTestExtension.java
index 32dec261ab15..cc6b4b6f2550 100644
--- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/StaticLogbackTestExtension.java
+++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/util/StaticLogbackTestExtension.java
@@ -21,13 +21,10 @@
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.filter.ThresholdFilter;
-import ch.qos.logback.classic.spi.ILoggingEvent;
import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
-import java.util.List;
-
/**
* This is a static wrapper around LogbackTestExtension for use in IT tests when you need to assert on App
* startup log entries
@@ -64,16 +61,8 @@ public void afterAll(ExtensionContext theExtensionContext) throws Exception {
myLogbackTestExtension.afterEach(theExtensionContext);
}
- public List filterLoggingEventsWithMessageEqualTo(String theMessageText) {
- return myLogbackTestExtension.filterLoggingEventsWithMessageEqualTo(theMessageText);
- }
-
- /**
- * Returns a copy to avoid concurrent modification errors.
- * @return A copy of the log events so far.
- */
- public java.util.List getLogEvents() {
- return myLogbackTestExtension.getLogEvents();
+ public LogbackTestExtension getLogbackTestExtension() {
+ return myLogbackTestExtension;
}
}
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index d418eebfb6e1..85a1d7c1ffdb 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index a24a770c6ea0..896b3ba3120b 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index d34eca320210..9dfdc4d52679 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index 0a241fe1a293..8c6ec9700c88 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index d3c570146be6..f7df57a5ee51 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml
index 03975dc2910d..ba31ac3cb2f2 100644
--- a/hapi-fhir-validation-resources-r4b/pom.xml
+++ b/hapi-fhir-validation-resources-r4b/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index 3d300b34a539..a9b999429c3a 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index a97d18b99bf5..ce3c5c602a50 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 9ce3b68a313f..865612ed58f1 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index f9ba636c8fe7..45474c6cc0bd 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 9b95f5121216..cd9aa43df9b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index e87614ddff13..abe1288dc88e 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index 984f0c2d7f59..ac4d0cff4a87 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index c222aa683e13..968330bb4392 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.3.9-SNAPSHOT
+ 7.3.10-SNAPSHOT
../../pom.xml