From a2e43070448bde744ada07d350bd2a54135828ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Thu, 25 Apr 2024 20:18:07 +0300 Subject: [PATCH] refactor: health check --- health-check/README.md | 2 +- .../src/test/java/DatabaseTransactionHealthIndicatorTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/health-check/README.md b/health-check/README.md index 563d2f52a..6577dc08f 100644 --- a/health-check/README.md +++ b/health-check/README.md @@ -1,5 +1,5 @@ --- -title: Health Check Pattern +title: Health Check category: Behavioral language: en tag: diff --git a/health-check/src/test/java/DatabaseTransactionHealthIndicatorTest.java b/health-check/src/test/java/DatabaseTransactionHealthIndicatorTest.java index a941313d8..c4ce08e71 100644 --- a/health-check/src/test/java/DatabaseTransactionHealthIndicatorTest.java +++ b/health-check/src/test/java/DatabaseTransactionHealthIndicatorTest.java @@ -82,7 +82,7 @@ class DatabaseTransactionHealthIndicatorTest { * returns a Health object with Status.UP. */ @Test - void whenDatabaseTransactionSucceeds_thenHealthIsUp() { + void whenDatabaseTransactionSucceeds_thenHealthIsUp() throws Exception { CompletableFuture future = CompletableFuture.completedFuture(Health.up().build()); when(asynchronousHealthChecker.performCheck(any(Supplier.class), eq(timeoutInSeconds))) .thenReturn(future); @@ -104,7 +104,7 @@ class DatabaseTransactionHealthIndicatorTest { * returns a Health object with Status.DOWN. */ @Test - void whenDatabaseTransactionFails_thenHealthIsDown() { + void whenDatabaseTransactionFails_thenHealthIsDown() throws Exception { CompletableFuture future = new CompletableFuture<>(); when(asynchronousHealthChecker.performCheck(any(Supplier.class), eq(timeoutInSeconds))) .thenReturn(future);