docs: improve health check

This commit is contained in:
Ilkka Seppälä committed 2024-04-25 20:16:37 +03:00
1 parent ec88a8a0ea
commit 63a2740210
4 files changed
+86 -397

No files matched your search

@@ -66,7 +66,7 @@ public class HealthCheckRepository {
* @throws Exception if the test transaction fails
*/
@Transactional
public void performTestTransaction() {
public void performTestTransaction() throws Exception {
try {
HealthCheck healthCheck = new HealthCheck();
healthCheck.setStatus(HEALTH_CHECK_OK);
@@ -22,9 +22,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.iluwatar.health.check.AsynchronousHealthChecker;
import com.iluwatar.health.check.CustomHealthIndicator;
@@ -22,9 +22,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
import com.iluwatar.health.check.AsynchronousHealthChecker;
import com.iluwatar.health.check.DatabaseTransactionHealthIndicator;