mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 07:13:02 +00:00
docs: improve health check
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user